Jump to content

HTML wrapper help please!

Adam_Cr1
Go to solution Solved by colonel_mortis,

Personally I would have it at the end absolutely positioned with javascript getting the height of the elements that you're extending and setting the height from that, but there might be a pure CSS way of doing it that I'm not thinking of right now. Center the main wrapper normally using

margin: 0 auto

Ok. I'm designing this website as part of college work and I want to have it with the main website centered in a 960px wrapper but I want the background colours (multiple sections) to go all the way across the page.

 

Do I need to use multiple wrapper divs to achieve this?

CPU: Intel i5 4690k  GPU: Sapphire R9 290 TRI-X OC

 

Link to comment
Share on other sites

Link to post
Share on other sites

If you're trying to do what I think you are, you need to either use multiple divs or have a background image that has the colours (although obviously this doesn't allow multiple the size of the content to dynamically affect the size of the blocks. You might have to look into having some javascript messing around with the sizes though.

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

Which section would I add another external wrapper div in?

CPU: Intel i5 4690k  GPU: Sapphire R9 290 TRI-X OC

 

Link to comment
Share on other sites

Link to post
Share on other sites

Personally I would have it at the end absolutely positioned with javascript getting the height of the elements that you're extending and setting the height from that, but there might be a pure CSS way of doing it that I'm not thinking of right now. Center the main wrapper normally using

margin: 0 auto

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks. I'll give that a shot after dinner :-)

CPU: Intel i5 4690k  GPU: Sapphire R9 290 TRI-X OC

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×