The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design How to show Background only Main Page in web responsive

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #269165

    Hi, I tried to fix that, I want to show background only in main page, not in other place of site.

    Can you help me???

    @media screen and (max-width: 600px){
        #main, .wrapper_blank #main {
            background: url(arbol.jpg);
            /*background: url(arbol.jpg);*/
            background-repeat: no-repeat;
            background-size: contain;
            -webkit-background-size: contain;
            -moz-background-size: contain;
            -ms-background-size: contain;
            -o-background-size: contain;

    If your home page has an identifying class in the body or html element, you can target it in your stylesheet and define styles that only apply to the home page;

    Example – if the .index class identifies the home page:

    .index #main {
    /* your styles here */

    This won’t apply to #main on other pages.

    You can use the developer console to check for your page’s identifying class in order to adapt this example to your own site – that’s F12 in most browsers.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design’ is closed to new topics and replies.