Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Extra space at bottom of page
Old 11-26-2006, 02:16 PM Extra space at bottom of page
Average Talker

Posts: 23
Trades: 0
Hi,

I have some extra space at the bottom of a page I am re-designing (I'm not too well versed in CSS). Can someone please take a look at this code and tell me how I can get rid of the excess? Also, any suggestions on cleaning up the CSS would be greatly appreciated. Thanks!

<style type="text/css">

body {
background: #400000;
font: 78%/1.5 arial, helvetica, serif;
text-align: center;
padding: 0;
margin: 1em;
height:500px;
}

#container {
width: 740px;
text-align: center;
margin: 0 auto;
}

#header {
position: relative;
left: 0px;
top: 0px;
}

#mainimage {
position: relative;
left: 258px;
top: -171px;
}

#smallimages {
position: relative;
left: 487px;
top: -354px;
}

#tabbedcontent {
position: relative;
top: -26em;
left: 22em;
}

#footer{
position: relative;
top: -51em;
left: 0em;
}

#backimage{
position: relative;
top: -51.0em;
z-index: -1;
text-align: center;
left: -10px;
}

#leftnav{
position: relative;
top: 160px;
left: -277px;
}

</style>
kalew is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-26-2006, 11:38 PM Re: Extra space at bottom of page
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
You're using relative positioning. Relative positioning simply takes an element and moves it to another area. The original area which is unused takes up white space.

My suggestion to you would be to look up how to use floats instead. Relative positioning is only meant for shifting things around when you don't want them to appear where they end up.

http://css.maxdesign.com.au/floatutorial/
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 11-27-2006, 12:41 PM Re: Extra space at bottom of page
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
It would be ok to use position: relative on your #container, but it is not necessary for everything else. There simply is no need to position every element.

Top, Left and z-index ONLY work with absolute positioning. You should be using margins and padding for your elements.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 11-29-2006, 08:54 PM Re: Extra space at bottom of page
kIDJOE's Avatar
Extreme Talker

Posts: 186
Location: Hollywood, CA
Trades: 0
remove the height of the body
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

kIDJOE is offline
Reply With Quote
View Public Profile Visit kIDJOE's homepage!
 
Reply     « Reply to Extra space at bottom of page
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.11798 seconds with 12 queries