icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old April 4th, 2006, 3:32 AM   #1 (permalink)
Surpass Fan
On a golden path...
 
pizzicar's Avatar
 
Joined in Feb 2006
Lives in Arizona
344 posts
Gave thanks: 3
Thanked 16 times
CSS help with margins

OK - new to this whole CSS thing so trying to learn. I built a test site to play around on - interestingtreasures.com Looking at the site, I have a left nav panel and a right main panel positioned absolute, then a footer panel below.

Looking at the footer, I am trying to get a 10px margin at the bottom but it goes to the page bottom. You can view source for the html (simple - no formatting there), and the css is below:
Quote:
body {
font: small/1.6em Verdana, Helvetica, Arial, sans-serif;
}
h1{
font-size: 160%;
}
#allcontent {
background: #1a50b8;
width: 799px;
margin-left: auto;
margin-right: auto;
}
#header {
margin: 0px;
height: 182px;
}
#main1 {
background-color: #00ffff;
margin: 10px 0px 0px 205px;
padding: 10px;
width: 565px;
}
#navbar {
background-color: #00ffff;
width: 160px;
margin: 10px 0px 0px 10px;
padding: 10px;
position: absolute;
top: 191px;
left: 28px;
}
#footer {
background-color: #00ffff;
margin: 10px;
}
Anyone help me understand why the footer does not give margin at the bottom....or is that even possible?

Edit: oops - lol - looks like I need to float the nav bar - bah......sleep, then fix -- anyway - footer question remains.

Thanks,
__________________
"Argue for your limitations, and sure enough, they are yours"

Last edited by pizzicar; April 4th, 2006 at 3:36 AM..
pizzicar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 4th, 2006, 4:12 AM   #2 (permalink)
rocks your socks.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,170 posts
Gave thanks: 8
Thanked 35 times
Your left block doesn't position correctly. I would suggest removing the top and left from the navigation part of the CSS. As for the footer, if I'm understanding correctly than you should change it to padding instead of margin.
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 4th, 2006, 6:29 AM   #3 (permalink)
Registered User
Seasoned Poster
 
Joined in Mar 2006
Lives in Canada
Hosted on pass94
88 posts
Gave thanks: 0
Thanked 0 times
Yes, I think david is on the ball.

For the footer, forget putting a margin on the bottom if you want to use a wrapper.

Instead of doing a margin on the footer element, ad a "padding-bottom: 10px;" to your allcontent element.
__________________
\\\\\\\\\\//////////
http://www.theweeklyrant.com
wickers is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 4th, 2006, 12:07 PM   #4 (permalink)
Surpass Fan
On a golden path...
 
pizzicar's Avatar
 
Joined in Feb 2006
Lives in Arizona
344 posts
Gave thanks: 3
Thanked 16 times
Thanks all - ya, saw the position error after I uploaded - was playing around trying different positioning methods and now know not to do absolute with fixed

I'll try the padding in all content this evening when I get off work. I was brought up on tables then got out of web stuff for a long time - coming back and learning this stuff is fun (but time consuming )
__________________
"Argue for your limitations, and sure enough, they are yours"
pizzicar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On