PDA

View Full Version : The image won't go over the whole screen :S



Meti
08-10-2008, 06:18 PM
Hey,
I'm currently coding a layout, and want to make the nav go over the whole screen.

I've tried:


#CSSname {
background-image: url(folder/image.png);
width: 100%;
height: 20px;
}

and



#CSSname {
background-image: url(folder/image.png);
height: 20px;
margin-left: 0px;
margin-right: 0px;
}
none of them works


Anything else that will work?


Thanks.

Johno
09-10-2008, 09:20 AM
You need to style the "body" of the document.


body {
margin-left: 0;
margin-right: 0;
}

Should work, I had the same problem recently :)

L?KE
09-10-2008, 02:43 PM
In order for something to be 100% width, the parent element must be 100%.

In this case, that is the body.

Meti
09-10-2008, 03:10 PM
But If I don't want everything to be over the whole screen?

Johno
09-10-2008, 03:55 PM
Well with my code it wouldn't be? The parent element (body) is the full screen, you would define the width of your container etc separately and the elements within that?

With the code I provided, your navigation should touch both sides of the screen

Meti
09-10-2008, 04:17 PM
Thanks!

+rep

@ Luke,
I can't give you rep. Need to spread.

L?KE
10-10-2008, 03:23 PM
Lol fair enough ;)

Want to hide these adverts? Register an account for free!