Motif theme: problem with front page text box position on small screens

  • Unknown's avatar

    Hi there,

    I changed the position on the text box in the front page of my blog thanks to this piece of code:

    .front-page-content-area .with-featured-image .hentry {
    	margin-top: -400px;
    	margin-left: 500px;
    }

    Then I realized this code was not working with small screens (iPad, iPhone…): the text box goes out!

    So I tried this piece of code:

    .mobile-theme.front-page-content-area .with-featured-image .hentry {
    	margin-top: -400px;
    	margin-left: 500px;
    }

    It makes things right on small screens but wrong on “normal” ones. I tried the two pieces altogether…but it seems that the mobile-theme code rules.

    Does anybody know how to control the position of such a text box on every kind of screens?

    Thanks for your help!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi again :)

    To make specific CSS works only for specific screens, take a look at Media Queries:

    Media Queries for Standard Devices

    Put your piece of CSS code for mobile inside the brackets of the media query for ipad/iphone and it should work for mobile-only.

  • Unknown's avatar

    Great tip! A million thanks!

  • The topic ‘Motif theme: problem with front page text box position on small screens’ is closed to new replies.