Random Space at the bottom of my page
- mindfullsilence
- Professor


- Joined: Aug 04, 2008
- Posts: 846
- Status: Offline
I have a page coded and everything, but there's a huge gap between the end of my content and the end of the page. Scrolls down alot. A lot of the page is made with divs. Anybody know what causes this. I've checked all my margins and whatnot. If need be I'll post the code.
Use your words like arrows to shoot toward your goal.
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
August 23rd, 2008, 12:17 pm
- neksus
- Mastermind


- Joined: Sep 10, 2004
- Posts: 2194
- Loc: Canada
- Status: Offline
- mindfullsilence
- Professor


- Joined: Aug 04, 2008
- Posts: 846
- Status: Offline
html:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see http://www.w3.org" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="reset.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jsnavbar.js">
</script>
</head>
<body> <!-- took ou onLoad content so post is smaller -->
<div id="wrap">
<div id="header">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th height="57" scope="col">
<div class="c1"><img src="images/logo.png" alt="" name="Logo" width="334" height="136" id="Logo" /></div></th>
<th scope="col">
<div class="c2"><img src="images/index_02.png" alt="" name="headerright" width="283" height="144" id="headerright" /></div></th>
</tr>
</table>
</div>
<div id="navbarwrap" align="center">
<div id="navbar"></div><!-- firefox/dreamweaver generated navbar deleted so post is smaller -->
</div>
<div id="maincontentheader">
<h1>Voltec Design</h1>
</div>
<div id="maincontenttext"></div>
<div id="minicontentheader1">
<h1>Service</h1>
</div>
<div id="minicontent1"></div>
<div id="minicontentheader2">
<h1>Guarentee</h1>
</div>
<div id="minicontent2"></div>
<div id="minicontentheader3">
<h1>Testimonials</h1>
</div>
<div id="minicontent3"></div>
</div>
</body>
</html>
quick reply but I kinda already fixed it...
All of my "minicontent" and "minicontentheader" divs were relative positioned, I changed them to absolute and repositioned them. This got rid of the extra space at the bottom but I still wanted a little bit of space at the bottom, about 10-20 pixels so I wrapped everything in an absolutely positioned <div id="wrap"> and gave it a specified height that was 20 pixels higher than the content. I'm pretty sure there's an easier way to do this but I am a learning boy... can't call my methods ingenious yet.
css:
Code: [ Select ]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see http://www.w3.org" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="reset.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jsnavbar.js">
</script>
</head>
<body> <!-- took ou onLoad content so post is smaller -->
<div id="wrap">
<div id="header">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th height="57" scope="col">
<div class="c1"><img src="images/logo.png" alt="" name="Logo" width="334" height="136" id="Logo" /></div></th>
<th scope="col">
<div class="c2"><img src="images/index_02.png" alt="" name="headerright" width="283" height="144" id="headerright" /></div></th>
</tr>
</table>
</div>
<div id="navbarwrap" align="center">
<div id="navbar"></div><!-- firefox/dreamweaver generated navbar deleted so post is smaller -->
</div>
<div id="maincontentheader">
<h1>Voltec Design</h1>
</div>
<div id="maincontenttext"></div>
<div id="minicontentheader1">
<h1>Service</h1>
</div>
<div id="minicontent1"></div>
<div id="minicontentheader2">
<h1>Guarentee</h1>
</div>
<div id="minicontent2"></div>
<div id="minicontentheader3">
<h1>Testimonials</h1>
</div>
<div id="minicontent3"></div>
</div>
</body>
</html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see http://www.w3.org" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Untitled Document</title>
- <link href="reset.css" rel="stylesheet" type="text/css" />
- <link href="layout.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="jsnavbar.js">
- </script>
- </head>
- <body> <!-- took ou onLoad content so post is smaller -->
- <div id="wrap">
- <div id="header">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <th height="57" scope="col">
- <div class="c1"><img src="images/logo.png" alt="" name="Logo" width="334" height="136" id="Logo" /></div></th>
- <th scope="col">
- <div class="c2"><img src="images/index_02.png" alt="" name="headerright" width="283" height="144" id="headerright" /></div></th>
- </tr>
- </table>
- </div>
- <div id="navbarwrap" align="center">
- <div id="navbar"></div><!-- firefox/dreamweaver generated navbar deleted so post is smaller -->
- </div>
- <div id="maincontentheader">
- <h1>Voltec Design</h1>
- </div>
- <div id="maincontenttext"></div>
- <div id="minicontentheader1">
- <h1>Service</h1>
- </div>
- <div id="minicontent1"></div>
- <div id="minicontentheader2">
- <h1>Guarentee</h1>
- </div>
- <div id="minicontent2"></div>
- <div id="minicontentheader3">
- <h1>Testimonials</h1>
- </div>
- <div id="minicontent3"></div>
- </div>
- </body>
- </html>
quick reply but I kinda already fixed it...
All of my "minicontent" and "minicontentheader" divs were relative positioned, I changed them to absolute and repositioned them. This got rid of the extra space at the bottom but I still wanted a little bit of space at the bottom, about 10-20 pixels so I wrapped everything in an absolutely positioned <div id="wrap"> and gave it a specified height that was 20 pixels higher than the content. I'm pretty sure there's an easier way to do this but I am a learning boy... can't call my methods ingenious yet.
css:
Code: [ Select ]
@charset "utf-8";
/* CSS Document */
body {
background-color: #333333;
background-image: url(images/background.png);
color: #FFFFFF;
}
#header {
position:absolute;
left:0px;
top:0px;
width:100%;
height:136px;
z-index:1;
overflow: visible;
background-image: url(images/headerbg.png);
}
#header th {
width: 100%;
height: 100%;
}
#navbarwrap {
position:absolute;
width:100%;
height:40px;
z-index:3;
left: -2px;
top: 135px;
background-image: url(images/navbarbg.gif);
border-bottom-color: #000000;
border-top-width: medium;
border-bottom-width: medium;
border-top-style: groove;
border-bottom-style: groove;
border-top-color: #000000;
}
#navbar {
width: 544px;
height: 40px;
margin-right: auto;
margin-left: auto;
border-right-color: #CC0000;
border-left-color: #CC0000;
border-left-style: groove;
border-right-style: groove;
border-right-width: medium;
border-left-width: medium;
}
#maincontentheader {
position:relative;
left:8%;
top:200px;
z-index:4;
background-image: url(images/navbarbg.gif);
width: 55%;
height: 40px;
}
#maincontenttext {
position: relative;
left: 8%;
width: 55%;
height: 590px;
background-color: #333333;
top: 200px;
}
#minicontentheader1 {
position: absolute;
width: 20%;
height: 40px;
background-image: url(images/navbarbg.gif);
left: 66%;
top: 200px;
}
#minicontent1 {
position: absolute;
width: 20%;
height: 150px;
left: 66%;
background-color: #333333;
top: 240px;
}
#minicontentheader2 {
position: absolute;
width: 20%;
height: 40px;
background-image: url(images/navbarbg.gif);
left: 66%;
top: 420px;
z-index: 8;
}
#minicontent2 {
position: absolute;
width: 20%;
height: 150px;
left: 66%;
background-color: #333333;
top: 460px;
}
#wrap {
position: relative;
height: 880px;
width: 100%;
}
#minicontentheader3 {
position: absolute;
width: 20%;
height: 40px;
background-image: url(images/navbarbg.gif);
left: 66%;
top: 640px;
z-index: 6;
}
#minicontent3 {
position: absolute;
width: 20%;
height: 150px;
left: 66%;
background-color: #333333;
margin-bottom: 0px;
top: 680px;
}
h1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
font-weight: bold;
padding-left: 10px;
padding-top: 10px;
font-variant: small-caps;
color: #FFFFFF;
}
/*<![CDATA[*/
div.c2 {text-align: right}
div.c1 {text-align: left}
/*]]>*/
/* CSS Document */
body {
background-color: #333333;
background-image: url(images/background.png);
color: #FFFFFF;
}
#header {
position:absolute;
left:0px;
top:0px;
width:100%;
height:136px;
z-index:1;
overflow: visible;
background-image: url(images/headerbg.png);
}
#header th {
width: 100%;
height: 100%;
}
#navbarwrap {
position:absolute;
width:100%;
height:40px;
z-index:3;
left: -2px;
top: 135px;
background-image: url(images/navbarbg.gif);
border-bottom-color: #000000;
border-top-width: medium;
border-bottom-width: medium;
border-top-style: groove;
border-bottom-style: groove;
border-top-color: #000000;
}
#navbar {
width: 544px;
height: 40px;
margin-right: auto;
margin-left: auto;
border-right-color: #CC0000;
border-left-color: #CC0000;
border-left-style: groove;
border-right-style: groove;
border-right-width: medium;
border-left-width: medium;
}
#maincontentheader {
position:relative;
left:8%;
top:200px;
z-index:4;
background-image: url(images/navbarbg.gif);
width: 55%;
height: 40px;
}
#maincontenttext {
position: relative;
left: 8%;
width: 55%;
height: 590px;
background-color: #333333;
top: 200px;
}
#minicontentheader1 {
position: absolute;
width: 20%;
height: 40px;
background-image: url(images/navbarbg.gif);
left: 66%;
top: 200px;
}
#minicontent1 {
position: absolute;
width: 20%;
height: 150px;
left: 66%;
background-color: #333333;
top: 240px;
}
#minicontentheader2 {
position: absolute;
width: 20%;
height: 40px;
background-image: url(images/navbarbg.gif);
left: 66%;
top: 420px;
z-index: 8;
}
#minicontent2 {
position: absolute;
width: 20%;
height: 150px;
left: 66%;
background-color: #333333;
top: 460px;
}
#wrap {
position: relative;
height: 880px;
width: 100%;
}
#minicontentheader3 {
position: absolute;
width: 20%;
height: 40px;
background-image: url(images/navbarbg.gif);
left: 66%;
top: 640px;
z-index: 6;
}
#minicontent3 {
position: absolute;
width: 20%;
height: 150px;
left: 66%;
background-color: #333333;
margin-bottom: 0px;
top: 680px;
}
h1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
font-weight: bold;
padding-left: 10px;
padding-top: 10px;
font-variant: small-caps;
color: #FFFFFF;
}
/*<![CDATA[*/
div.c2 {text-align: right}
div.c1 {text-align: left}
/*]]>*/
- @charset "utf-8";
- /* CSS Document */
- body {
- background-color: #333333;
- background-image: url(images/background.png);
- color: #FFFFFF;
- }
- #header {
- position:absolute;
- left:0px;
- top:0px;
- width:100%;
- height:136px;
- z-index:1;
- overflow: visible;
- background-image: url(images/headerbg.png);
- }
- #header th {
- width: 100%;
- height: 100%;
- }
- #navbarwrap {
- position:absolute;
- width:100%;
- height:40px;
- z-index:3;
- left: -2px;
- top: 135px;
- background-image: url(images/navbarbg.gif);
- border-bottom-color: #000000;
- border-top-width: medium;
- border-bottom-width: medium;
- border-top-style: groove;
- border-bottom-style: groove;
- border-top-color: #000000;
- }
- #navbar {
- width: 544px;
- height: 40px;
- margin-right: auto;
- margin-left: auto;
- border-right-color: #CC0000;
- border-left-color: #CC0000;
- border-left-style: groove;
- border-right-style: groove;
- border-right-width: medium;
- border-left-width: medium;
- }
- #maincontentheader {
- position:relative;
- left:8%;
- top:200px;
- z-index:4;
- background-image: url(images/navbarbg.gif);
- width: 55%;
- height: 40px;
- }
- #maincontenttext {
- position: relative;
- left: 8%;
- width: 55%;
- height: 590px;
- background-color: #333333;
- top: 200px;
- }
- #minicontentheader1 {
- position: absolute;
- width: 20%;
- height: 40px;
- background-image: url(images/navbarbg.gif);
- left: 66%;
- top: 200px;
- }
- #minicontent1 {
- position: absolute;
- width: 20%;
- height: 150px;
- left: 66%;
- background-color: #333333;
- top: 240px;
- }
- #minicontentheader2 {
- position: absolute;
- width: 20%;
- height: 40px;
- background-image: url(images/navbarbg.gif);
- left: 66%;
- top: 420px;
- z-index: 8;
- }
- #minicontent2 {
- position: absolute;
- width: 20%;
- height: 150px;
- left: 66%;
- background-color: #333333;
- top: 460px;
- }
- #wrap {
- position: relative;
- height: 880px;
- width: 100%;
- }
- #minicontentheader3 {
- position: absolute;
- width: 20%;
- height: 40px;
- background-image: url(images/navbarbg.gif);
- left: 66%;
- top: 640px;
- z-index: 6;
- }
- #minicontent3 {
- position: absolute;
- width: 20%;
- height: 150px;
- left: 66%;
- background-color: #333333;
- margin-bottom: 0px;
- top: 680px;
- }
- h1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 20px;
- font-weight: bold;
- padding-left: 10px;
- padding-top: 10px;
- font-variant: small-caps;
- color: #FFFFFF;
- }
- /*<![CDATA[*/
- div.c2 {text-align: right}
- div.c1 {text-align: left}
- /*]]>*/
Use your words like arrows to shoot toward your goal.
Page 1 of 1
To Reply to this topic you need to LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 3 posts
- Users browsing this forum: No registered users and 81 guests
- You cannot post new topics in this forum
- You cannot reply to topics in this forum
- You cannot edit your posts in this forum
- You cannot delete your posts in this forum
- You cannot post attachments in this forum
