Stromgren Posted March 21, 2012 Share Posted March 21, 2012 Hello.. I have a problem with this header http://byvejen.dk/lb/home . It creates a margin to the top and the sides. Does anyone know to get rid of this? CSS Code: #header { width:auto; height:45px; background-color:#20558a; } #header_container { width:960px; height:45px; margin-left:auto; margin-right:auto; } Link to comment Share on other sites More sharing options...
dsonesuk Posted March 21, 2012 Share Posted March 21, 2012 I think you a talking about the default margin setting for body, that is causing the gap, therefore set it to zero. body { font-family: Arial,Helvetica,sans-serif; margin: 0;} Link to comment Share on other sites More sharing options...
Stromgren Posted March 21, 2012 Author Share Posted March 21, 2012 I think you a talking about the default margin setting for body, that is causing the gap, therefore set it to zero. body { font-family: Arial,Helvetica,sans-serif; margin: 0; } Thanks a lot, i didn't knew there was such a thing as default margin Now i have en ekstra question. On this site: http://byvejen.dk/lb/faq.php i need to make the left column reach the footer.. How can i make this work? Link to comment Share on other sites More sharing options...
dsonesuk Posted March 21, 2012 Share Posted March 21, 2012 By illusion, by using image, or position: absolute element image optionremove by commenting out the background color, and border of .faq_column .faq_column { /*background-color: #F7F8F9; border-right: 1px solid #1B4875;*/ float: left; height: auto; margin: 0; padding-bottom: 25px; width: 370px; z-index: 10;} create a 10px high image by 371px wide with a background colour of #F7F8F9, with 1px border color #1B4875 to the right. Then repeat this down the left edge of wrapper #wrapper { height: auto; margin-left: auto; margin-right: auto; overflow: hidden; /*added by dsonesuk*/ width: 960px;background: url("left_bg_image.png") repeat-y left top;/*added by dsonesuk*/} position: absolute element option create a div element within #wrapper, place it anywhere it does not matter with id="left_bg" and styling below #left_bg { position: absolute;left: 0;top: 0;bottom: 0;width: 370px;background-color: #F7F8F9;border-right: 1px solid #1B4875; z-index: 0;} /*wrapper styling*/ #wrapper { height: auto; margin-left: auto; margin-right: auto; overflow: hidden;/*added by dsonesuk*/ position: relative;/*added by dsonesuk*/ width: 960px;} /*faq_column styling*/ .faq_column { background-color: #F7F8F9; border-right: 1px solid #1B4875; float: left; height: auto; margin: 0; padding-bottom: 25px; position: relative; width: 370px; z-index: 5;} Link to comment Share on other sites More sharing options...
Stromgren Posted March 22, 2012 Author Share Posted March 22, 2012 Thats genius I can't really understand why a feature so simple should be so hard to create. Anyways, thanks a lot dsonesuk Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now