Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    1
    Member #
    26347
    I'm using a basic 3 column layout with a header and footer. My problem is, though all my heights are set to min-height 100% and/or height 100%, my page always generates extra scrolling. Though my content hardly takes up the half page, there's still roughly 100px I still have to scroll through.

    Here's all my code:

    HTML Code:
    <style type="text/css">
    html, body {
    	margin:0;
    	padding:0;
    	height:100%;
    	min-width:800px;
    }
    #container {
    	min-height:100%;
    	height:auto;
    	height:100%;
    	position:relative;
    	width:1000px;
    	margin: 0 auto;
    }
    #header {
    	position:relative;
    	height:100px;
    	width:100%;
    	display:block;
    	overflow:auto;
    	padding-bottom:20px;
    }
    #leftcol {
    	width:15%;
    	float:left;
    	position:relative;
    	padding-left:20px;
    	line-height:100%;
    }
    #twocols {
    	width:82%;
    	float:right;
    	position:relative;
    	height:100%
    }
    #rightcol {
    	width:19%;
    	float:left;
    	position:relative;
    	padding-left:20px;
    	line-height:100%;
    }
    #maincol {
    	background-color: #FFFFFF;
    	float: left;
    	position: relative;
    	width:73%;
    	border-left-style: solid;
    	border-left-color: gray;
    	border-left-width: 1px;
    	border-right-style: solid;
    	border-right-color: gray;
    	border-right-width: 1px;
    	padding-left:20px;
    	padding-right:10px;
    	padding-bottom:25px;
    	margin-top:0px;
    	height:100%;
    }
    .inline {
    	display:inline;
    }
    #footer {
    	height:25px;
    	background-color:gray;
    	clear:both;
    	display:block;
    	overflow:auto;
    	padding-left:5px;
    	padding-top:5px;
    	position:relative;
    	bottom:0;
    	width:1000px;
    	margin: 0 auto;
    	z-index:10;
    }
    
    A:link {
    	text-decoration: none;
    	color:black;
    }
    A:visited {
    	text-decoration: none;
    	color:black;
    }
    A:active {
    	text-decoration: none;
    	color:black;
    }
    A:hover {
    	text-decoration: underline;
    }
    </style>
    
    <head>
    <title>Michael Carper</title>
    <meta name="description" content="Welcome to Michael Carper's site. I'm a student at Wabash interested in the internet and social media, law, and religion." >
    <meta name-"keywords" content="Michael Carper, Michael student, Michael Carper Wabash" >
    </head>
    
    <body>
    <div id="container">
      <div id="header"><img src="website banner.png" height="100" /></div>
      <div id="twocols">
        <div id="maincol">
          <h2 class="inline">Welcome To Michael Carper's Website</h2>
          <br />
          <br />
          <p class="inline"><a name="about michael carper" style="text-decoration:none">Hi, I'm Michael Carper, a student at Wabash College. I built this website to gain experience in all the processes associated with web design and management. It also serves as a hub for all my activity on the internet. It's currently a little bare, save the links to the left, so check them out. More is to come.</a></p>
        </div>
        <div id="rightcol">
          <P class="inline">Link1<br />
            Link2<br />
            Link3</P>
        </div>
      </div>
      <div id="leftcol">
        <p class="inline"><a name="michael carper" href="index.html">Welcome</a><br />
          <a name="contact michael carper" href="find me.html">Find me</a><br />
          <a name="michael carper blog" href="blog.html">I blog</a><br />
          <a name="michael carper wabash" href="wabash.html">I go to Wabash</a></p>
      </div>
    
    <div id="footer">Copyright Michael Carper, 2011</div>
    </div>
    </body>
    </html>
    Any help would be appreciated. Thanks.

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Try taking out the part in red below...and I would put the CSS in a separate file - easier and faster to edit and to load.

    <style type="text/css">
    html, body {
    margin:0;
    padding:0;
    height:100%;
    min-width:800px;
    }
    #container {
    min-height:100%;
    height:auto;
    height:100%;
    position:relative;
    width:1000px;
    margin: 0 auto;
    }
    #header {
    position:relative;
    height:100px;
    width:100%;
    display:block;
    overflow:auto;
    padding-bottom:20px;
    }
    #leftcol {
    width:15%;
    float:left;
    position:relative;
    padding-left:20px;
    line-height:100%;
    }
    #twocols {
    width:82%;
    float:right;
    position:relative;
    height:100%
    }
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:30 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com