|
Posted by Els on 09/28/05 08:55
nickolas80@gmail.com wrote:
> I have a DIV which I want to completely go from one side of the page to
> the other, with not whitespace or margins. I can not seem to get it to
> work, it is flush on the left, but leaves about 15px of whitespace on
> the right side.
>
> Here is my CSS:
>
> #MidBar {
> position: absolute;
> height: 50px;
> width: 100%;
> left: 0px;
> top: 110px;
> background-color: #0066CC;
> right: 0px;
> }
>
> and my div:
>
> <div class="MidBar" id="MidBar"></div>
>
> any suggestions?
Yes, I have two.
One: leave out the width, and the 'right' property. Any div by default
automagically stretches to 100% of what's the available width for it.
Two: the 15px space is probably the padding or margin on <html> or
<body>.
Add this to your styles:
html,body{margin:0;padding:0;}
and see if that helps. If it doesn't, you'll need to show an actual
example of your problem, for further investigation :-)
(and Three: I hope this div isn't meant to have text in it, and also
doesn't have text above it)
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
[Back to original message]
|