100% width doesn’t work for me!!!  Help!!!!!
Posted: 27 June 2006 06:20 PM   [ Ignore ]
Newbie
Rank
Total Posts:  3
Joined  2006-06-27

I have included a link to a screenshot of my output in a browser:

http://i34.photobucket.com/albums/d129/konvict215/helpme.gif

Why is it that the element will not stretch totally “100%” across the screen?  How do I get it where there is no space on the left or right side of the element?

Here is the CSS for the element:

#flashsection{
width100%;
background#fff;

Here is the HTML for the element

<div id="flashsection"I cannot get this element to stretch across the entire window....<br>I cannot get this element to stretch across the entire window....<br>I cannot get this element to stretch across the entire window....<br>I cannot get this element to stretch across the entire window....<br>I cannot get this element to stretch across the entire window....<br>I cannot get this element to stretch across the entire window....<br>I cannot get this element to stretch across the entire window....<br> </div

Please help me out…

Profile
 
 
Posted: 27 June 2006 11:31 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  1
Joined  2006-06-27

#flashscreen is taking 100% of its available width.  The reason for the spaces inbetween the div and the side of the window are because of the default padding/margins applied to the body document in your browser.  Try adding:


body {
  padding: 0;
  margin: 0;
}

Profile
 
 
Posted: 28 June 2006 02:00 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  3
Joined  2006-06-27

Oh man, works like a charm.  I’ve been stuck on that problem for a LONG time and never did I think to just make the padding and margin in the body set to zero.  Thanks a million!!!!

Profile
 
 
Posted: 28 June 2006 04:41 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  1
Joined  2006-06-28

Also try using this for padding and margins.
It will delete ALL padding and margins from everything to begin with - so you can start with a clean slate.
Then just add as you need or see fit to each div, p, etc.

* {
padding: 0;
margin: 0;
}

Profile