Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help for displaying image and text differently on desktop and mobile #92

Open
yannrapaport opened this issue May 9, 2016 · 0 comments

Comments

@yannrapaport
Copy link

Hi,

I am new to HTML and CSS.

I am trying to build a homepage on shopify using the Brooklyn theme which takes advantage of your grid framework.

I would like to have 4 sections with an image and some text each, appearing as follows on a desktop:

img1 | text1
text2 | img2
img3 | text3
text4 | img4

and as follows on mobile:

text1
img1
text2
img2
text3
img3
text4
img4

I have tried to use push and pull classes without success. Here is my code:

<div class="grid">
    <div class="grid__item one-half push--medium--one-half push--large--one-half small--one-whole">
    <p>text1</p>
    </div>
    <div class="grid__item one-half pull--medium--one-half pull--large--one-half small--one-whole">
        <img src="/path/to/img1"/>
    </div>
</div>
<div class="grid">
   <div class="grid__item one-half small--one-whole">
        <p>text2</p>
    </div>
    <div class="grid__item one-half small--one-whole">
        <img src="/path/to/img2"/>
    </div>
</div>

With this code, text1 and img1 both appear overlapping on the right half of the screen... It works well with text2 and img2, likely because they appear in the same order as in the HTML...

Am I missing something?

Thanks in advance for your help!

Yann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant