07 June 2007

CSS Tip #1

If you have a div that needs to go the height of the entire page the way a body tag can. For instance, if you wanted one background image for the body tag and another for a div tag, like having multiple borders. I ran into this issue when setting:


#bg2
{
height:100%;
width:700px;
margin-left: auto;
margin-right: auto;
}


the height gets ignored on most browsers, make sure to include:

html, body
{
height:100%;
}

body
{
width:800px;
margin-left: auto;
margin-right: auto;
}


so if you have html head../head body div id="bg2" .../div /body /html

Labels: , , ,

3 Comments:

Anonymous Anonymous said...

[B]NZBsRus.com[/B]
Forget Crawling Downloads With NZB Files You Can Easily Search HD Movies, Games, MP3 Singles, Applications & Download Them @ Alarming Rates

[URL=http://www.nzbsrus.com][B]Usenet[/B][/URL]

February 5, 2010 1:34 AM  
Anonymous Anonymous said...

Study Our Revealing Prices at www.Pharmashack.com, The Unequalled [b][url=http://www.pharmashack.com]Online Apothecary's [/url][/b] To [url=http://www.pharmashack.com]Buy Viagra[/url] Online ! You Can also Details to Nicely postponed Deals When You [url=http://www.pharmashack.com/en/item/cialis.html]Buy Cialis[/url] and When You You [url=http://www.pharmashack.com/en/item/levitra.html]Buy Levitra[/url] Online. We Also Assimilate a Meaningful Generic [url=http://www.pharmashack.com/en/item/phentermine.html]Phentermine[/url] As a armed forces to Your Eats ! We Vend Border of job make short acme wine [url=http://www.pharmashack.com/en/item/viagra.html]Viagra[/url] and Also [url=http://www.pharmashack.com/en/item/generic_viagra.html]Generic Viagra[/url] !

February 18, 2010 5:17 PM  
Anonymous Anonymous said...

I read this forum since 2 weeks and now i have decided to register to share with you my ideas. [url=http://inglourious-seo.com]:)[/url]

March 8, 2010 3:20 AM  

Post a Comment

Links to this post:

Create a Link

<< Home