1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to get background to show ONLY on home page?

Discussion in 'HTML & Website Design' started by WonderingCoder, Dec 21, 2013.

  1. #1
    Hello, my website is http://bunkerreview.blogspot.com

    I am trying to get it so my background ONLY shows up on my home page, and no other pages.

    The code that I see for my background is:

     <Variable name="body.background" description="Body Background" type="background"
           color="transparent" default="$(color) none repeat scroll top left" value="$(color) url(http://3.bp.blogspot.com/-CKHjcG8NgZg/UrT-AGZA91I/AAAAAAAAADU/6SvtJg0Q780/s0/tiger-woods-hd-wallpaper.jpg) repeat scroll top left"/>
    HTML:
    However, that background shows up on all the pages. How do I fix this? The platform i am using is Blogger Thanks!
     
    WonderingCoder, Dec 21, 2013 IP
  2. Mehdi Jazini

    Mehdi Jazini Active Member

    Messages:
    58
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #2
    Hello
    The blogspot.com is not professional... i suggest you to switch to wordpress.com
     
    Mehdi Jazini, Dec 23, 2013 IP
  3. profoundDmd

    profoundDmd Greenhorn

    Messages:
    18
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    8
    #3
    Can't you just remove that code, place a div in you homepage and give that the background you want?
    There's probably already a div that you can use to make this work on your homepage anyway.
     
    profoundDmd, Dec 23, 2013 IP
    hassan001 likes this.
  4. Cone Man

    Cone Man Active Member

    Messages:
    46
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    90
    #4
    This ^

    There's no way I can see this working in blogger. The reason is because there are no different css classes per page, which Wordpress does support.

    In Wordpress, you would just add CSS that looked something like:

    
    body.home {
    background: url(http://3.bp.blogspot.com/-CKHjcG8NgZg/UrT-AGZA91I/AAAAAAAAADU/6SvtJg0Q780/s0/tiger-woods-hd-wallpaper.jpg);
    }
    
    Code (markup):
     
    Cone Man, Dec 24, 2013 IP
  5. easyolcash

    easyolcash Active Member

    Messages:
    302
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    80
    Digital Goods:
    1
    #5
    Try this code:

    <style>
    <b:if cond='data:blog.pageType != &quot;index&quot;'>
    body{
    background:none;
    }
    </b:if>
    </style>
    Code (markup):

    OR


    <style>
    <b:if cond='data:blog.pageType == &quot;item&quot;'>
    body{
    background:none;
    }
    </b:if>
    </style>
    Code (markup):
    Put it before
    </head>
    Code (markup):
     
    easyolcash, Dec 24, 2013 IP
  6. Irfan-khan

    Irfan-khan Greenhorn

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #6
    Dont give background to body. make a div a give it a background and dont repete this div on the other pages.
     
    Irfan-khan, Dec 24, 2013 IP