March 3, 2013

twitter bootstrap background images for two sections

Question by Looneyviticus

I am using Twitter bootstrap and I have a one page website with a top section and a bottom section. I would like to place different background images in each section; however, I cannot seem to get it to work- are there any suggestions?

Here is my HTML:

<section class="container-fluid">
<div class="row-fluid">
    <div class="span4 offset4">
    <br />
        <img src="images/logo.png" width="400" height="400" image alt="image" />
    </div>
</div>
<div class="row12">
    <h3><p class="text-center"></p></h3>
    <h4><p class="text-center"></p></h4>
    <h4><p class="text-center"></p></h4>
    <br />
    <br />
</div>
<div class="row-fluid">
<ul class="thumbnails">
    <li class="span1 offset4">
        <a href="#" class="thumbnail">
            <img src="images/MAIL_icon.png" width="50" height="50" image alt="image" />
        </a>
    </li>
    <li class="span1">
        <a href="#" class="thumbnail">
            <img src="images/DRIBBBLE_icon.png" width="50" height="50" image alt="image" />
        </a>
     </li>
     <li class="span1">
        <a href="#" class="thumbnail">
            <img src="images/TWITTER_icon.png" width="50" height="50" image alt="image" />
        </a>
     </li>
     <li class="span1">
        <a href="#" class="thumbnail">
            <img src="images/INSTAGRAM_icon.png" width="50" height="50" image alt="image" />
            </a>
         </li>
    </ul>
</div>
</section>

and my CSS:

#top_section {background-image: url(images/urban_lights.png);

}

Answer by Starx

Assign different background to your different section.

#topSection {
   background-image: url("url/to/image.jpg");
}
#bottomSection {
   background-image: url("url/to/image.jpg");
}

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!