PDA

View Full Version : Stretch Header 100% css


africano
09-09-2008, 05:25 PM
Im trying to stretch My Header across the whole screen. Ive taken my TOP div outside my wrapper ellement. and given it a width of 100%.

Now Ive realised Im using a BG image and not an actuall image. is this why its not working?

Ive tried googling this but no straight forward answers are anywhere, if anybody has any thoughts, please let me know.

domedia
09-09-2008, 05:35 PM
Im trying to stretch My Header across the whole screen. Ive taken my TOP div outside my wrapper ellement. and given it a width of 100%. excellent. Even if you removed the width it would still stretch 100% because a DIV is a block element
Now Ive realised Im using a BG image and not an actuall image. is this why its not working?
1. What is not working?
2. Backgrounds *are* images.

Corrosive
09-09-2008, 05:36 PM
Im trying to stretch My Header across the whole screen. Ive taken my TOP div outside my wrapper ellement. and given it a width of 100%.

Now Ive realised Im using a BG image and not an actuall image. is this why its not working?

Ive tried googling this but no straight forward answers are anywhere, if anybody has any thoughts, please let me know.

Mate, are you asking why your header image doesn't stretch to fill the whole browser? Please tell me you aren't!

africano
09-09-2008, 05:39 PM
ummm Im scared!:roll:!!!

Sorry for the confusion! Im asking How to stretch my header image across(or how to make it fill horisontally).....Like here for example:

http://www.slimkiwi.com/

Im sorry if Im coming across as a total ass!

Corrosive
09-09-2008, 05:52 PM
ummm Im scared!:roll:!!!

Sorry for the confusion! Im asking How to stretch my header image across(or how to make it fill horisontally).....Like here for example:

http://www.slimkiwi.com/

Im sorry if Im coming across as a total ass!

He, he. Don't be scared Africano :wink:

OK, look at what they have actually done. The main picture of the trees is in the middle. The bit that stretches across the browser window is just a repeated gradient image. This would be easily achieved with a div inside a div.

africano
09-09-2008, 05:55 PM
ummmmhhhhh....when you explain it like that it sounds so obvious!!!!
hahha.

Yeah I sorta, kinda get it. So the trick is to have the image in the middle and then use gradients or colors for the rest...(if u get what I mean)

Edit: But what if you had grass....how would you stretch that?? You see what I mean?

Corrosive
09-09-2008, 06:06 PM
But what if you had grass

There are limits to what you can do mate. Design around the issue.