CSS - Long Page Text Not Pushing Footer Down
Hello,
I'm currently in the works of converting an old HTML site of mine into CSS and have run into what seems to be a notorious problem with the page text not pushing the footer down when the text gets to a certain length. Instead the text just covers and hides the footer. I've been trying to remedy this problem for about a week, but to no avail. I've Googled this problem and tried the suggested fixes, but once again have had no such luck. I'm left to believe that every instance is unique. If you view the Style Sheet, I have the 'footerlinks' set at an "Absolute" position because it looks fine on the other pages and I do relize this will have to be changed. As to what else has to be changed I would really appreciate some input as to what I need to do to get the footer to slide down when the text gets lengthy. ------- Here's a link to the page thats having issues with the footer... *** Note: I keep getting an error message saying I can't post URLs on this forum because I have a new user account so below this line is the link to the page I'm having trouble with without the http:// ........ infoheaven.bravepages.com/Testamonials/Testimonials.htm The URL to the STYLE SHEET is located at the top of the page between the "Head" tags of the website source code I provided above. I tried listing my CSS code here, but once again I kept getting the "New user accounts are not permitted to create posts containing URLs" error message. Sorry for the inconvenience.... Dan - Similar TutorialsHi everyone, It's been a while since I've opened up a .css file so forgive me. I have a couple of questions about this partiular site. It's a test site I'm workig on... http://www.karenwilliamson.com/joom2/ I would like if possible to fix the footer in a fixed position and not have it rise and fall according to the amount of content on each page. Click some of the random links and you'll see what I mean. Also, while I'm here I can't figure out how to adjust the spacing in the main content area to be more uniform between IE7 and FF. It seems to my novice eyes that it should be controlled by Code: table.contentpaneopen Maybe I'm being too nitpicky but I'm sure there is a way to make it more uniform among the two browsers? Thanks for any input Rob Hello, I've had an issue for a while where when the text on the page gets to a certain point it just overlaps the Copyright Information which I want to stay at the bottom of the page. --- (I did look at older forum posts, but with no resolve) --- In the CSS code, I have the copyright (a.k.a. .footerlinks) set with an "Absolute" Position which I know is probably "part of" or "the" problem, but if I change the Positioning the footer ends up on the top of the page or somewhere I don't want it. (** Unfortunately due to New Members not being able to post hyperlinks I am unable to give a link to the webpage or CSS page for viewing. **) But, I have included the code snippet I use for the Footer itself and the "container" and "body" code whether its needed..... body{ margin:0; text-align:center; background-color: #FFFFFF; } .container{ position: relative; width:965px; margin:0 auto 0; height: 100%; } .footerlinks{ position: absolute; top: 1140px; left: 237px; width: 551px; font-size: 75%; font-family: verdana; text-align: center; } CSS is quite new to me so be as specific as possible as to what I should be looking at changing in my code.... Your assistance is much appreciated! Thanks! Dan - Hi How can I wrap a long line of text inside a fixed width div? This is the line in my index.html: PHP Code: <PRE class=yup>blah blah blah and more blah blah blahblah more blah blah blah yes yes blah blah</PRE> This is my PRE code in style.css: PHP Code: PRE { BORDER-RIGHT: #2f6fab 1px dashed; PADDING-RIGHT: 1em; BORDER-TOP: #2f6fab 1px dashed; PADDING-LEFT: 1em; PADDING-BOTTOM: 1em; BORDER-LEFT: #2f6fab 1px dashed; COLOR: #000000; LINE-HEIGHT: 1.1em; PADDING-TOP: 1em; BORDER-BOTTOM: #2f6fab 1px dashed; BACKGROUND-COLOR: #f9f9f9; width: 90%; } PRE.yup { COLOR: #000000; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; FONT-SIZE: 12px; text-align: left; width: 80%; margin: 12px auto; } The PRE tag is in a table and i want the long text the same lenght as the short text, but i have no clue how to do it. Any ideas? I have a script that shows the latest lines from my chat. sometimes people will post a super long url or another super long thing without periods ie testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something how can I make css break that up so the browser window won't scroll vertically? Anybody know how to force a long string of text that doesn't contain any spaces to wrap inside its containing div, and not just sprawl outside of the entire page? I've done some searching and can't seem to find a lot of discussion about this particular problem. If the content contained enough spaces, then the overflow would wrap nicely, but there aren't any. What am I missing here? Thanks Hi! Have been bashing my head against the wall with this one for a while now, so I thought maybe someone here could help me out a bit. Basicly, this sums up the issue: (sorry for the pure-text link, it didn't allow me to put up a propper one... >.<) http://img205.imageshack.us/my.php?image=cssiebug.png So, what I want is that the search field stays put, no matter how much text is entered into it. This works in all the other browsers, thought it's still a bit buggy, but I think I can fix that. Here is the code that should be of interest in this issue: Code: <div id="bannerContent"> <!--{{{--> <div id="logo"> <a href="<?PHP echo $home ?>" target="_self"></a> </div> <div id="search"> <form> <input type="text" class="searchField" name="uSearchQuery"> <input type="submit" class="searchSubmit" name="uSubmitQuery" value="" onFocus="this.blur()"> </form> </div> <!--}}}--> </div> Code: #bannerContent /*{{{*/ { width: 800px; height: 158px; } #logo /*{{{*/ { background: url("../images/layout/logo.png") no-repeat; width: 394px; height: 56px; position: relative; top: 51px; left: 24px; float: left; } /*}}}*/ #search /*{{{*/ { width: 331px; height: 32px; position: relative; top: 62px; left: 58px; display: inline; float: left; } .searchField { background: url("../images/layout/search_field_bg.png") no-repeat; width: 266px; height: 32px; border: none; outline: none; float: left; <?PHP if (!$agentIE && !$agentFF) echo 'padding-left: 10px;' . "\n"; else echo 'padding: 8px 0 0 10px;' . "\n"; ?> } .searchSubmit { background: url("../images/layout/search_button.png") no-repeat; width: 55px; height: 32px; margin-left: -10px; border: none; outline: none; cursor: pointer; float: left; } /*}}}*/ /*}}}*/ Thanks a bunch in advance! hi i have a page that contains a large html table. this table spans many pages (in internet explorer it spans 6 pages). however, when i view the print preview in firefox it only shows 1 of 1 page, and at the bottom of the page, where i would expect a page break to exist, the table continues on and then off the bottom of the page. basically, it seems to be attempting to render the entire table on to one page, even though it won't fit. has anyone got any ideas how i can make this table print on multiple pages? i've read somewhere that gecko based browsers have a problem with floated content, but i'm sure i've un-floated everything. thanks in advance. dave Hi, I am at a loss. I have a basic css webpage at websitehosting1.com/Tutorials.html when you go to the tutorials page that I created for my friends, the footer adds white space above it when I add text to the body. I want the left nav right nav and footer to be blue, but I can't figure this out. All help is appreciated. Thanks. E. Hey everyone, I have decided to start back designing websites and so went back to the basics of html and css. So far things are ok except for the footer that I'm trying to get to sit at the bottom of the page. What I have done: So far I've been able to set the footer as fixed so that as I scroll I'll always see the footer. I don't have a problem always seeing my footer, the problem is that it's hiding some of the text when it reaches the bottom. This is what I have so far (and the website is w3c validated and so are the css) my website code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Home</title> <link rel="stylesheet" href="css/shawnlynn.css" type="text/css" media="screen"> <link rel="stylesheet" href="css/layout.css" type="text/css" media="screen"> </head> <body> <div class="wrapper"> <div id="header"> <img src="images/headerlynn.png" alt="header for Shawna Lynn"> </div><!-- end of header div--> <ul id="navlist"> <li><a href="index.html" title="Home">Home</a>|</li> <li><a href="about.html" title="About me">About Me</a>|</li> <li><a href="blog.html" title="Blog">Blog</a>|</li> <li><a href="services.html" title="services">Services</a>|</li> <li><a href="clients.html" title="Clients">Clients</a>|</li> <li><a href="contact.html" title="contact me">Contact Me</a></li> </ul> <hr> <div id="maincontent"> <blockquote><h2><img src="images/celebration.png" title="Celebration Time" alt="celebration time image"></h2> <p class="goldlinep">You have just struck gold! </p> <p class="goldimage"><img src="images/gold-mine-icon.png" title="gold mine image" alt="gold mine image"></p> <p class="goldlinep">A Standards-Compliant Website design like this is your personal Goldmine<br> Why not reap the benefits?!</p> </blockquote> </div><!--end of maincontent div--> <div class="push"></div> </div> <div id="footer"> <p class="footerp">Copyright 2011- Shawna Lynn Creative Initiatives. Some images may be subject to copyright.</p> <br> <p><a href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.lynnfolio.cz.cc/original/" target="_blank"><img src="validation/valid-html401-blue.png" title="valid html" alt="valid html"> </a> <img src="validation/vcss-blue.gif" title="valid css" alt="valid css"></p> </div><!--end of footer div--> </body> </html> The general css is: Code: /**Layout**/ #header{ top:10px; right: 0px; left: 200px; position:absolute; background-color: #ffffff; } #header, #sidebar, #maincontent, #footer{ position: absolute; } #maincontent{ top: 245px; left: 285px; } #footer { bottom:0px; position:fixed; width:100%; background-color: #0000ff; height:50px; padding-right:0px; margin:0; } /*Layout */ .footerp{ color: #ffffff; text-align:center;} h2 { font-family: "Trebuchet MS", sans-serif; font-size: 2em; } .goldlinep { font-family: "Trebuchet MS", sans-serif; text-align:center; font-size: 1.25em; word-spacing: 1pt; } .goldimage { padding-left: 200px; } p { font-family: "Trebuchet MS",sans-serif; color: #000000; font-size: .9em; text-align: justify; } blockquote { text-align: center; width: 650px; background-color: #ffffff; } li { font-family: "Trebuchet MS", sans-serif; } body { background-color:#ffffff; background-repeat: repeat; min-width: 768px; max-width: 1280px; font-size: 12px; } #colordiff { background-color: #9a32cd; } .colordiffp { background-color: #fffacd; } /**Navigation**/ #navlist { padding-top: 200px; padding-left: 0px; list-style-type: none; font-size: 14px; text-align:center; } #navlist li { display: inline; font-size: 1.25em; } #navlist a{ padding: 3px 15px; } #navlist a:link, #navlist a:visited { color: #00ccff ; } #navlist a:hover { color: #00ffff; } /**Navigation**/ /* About Us Page */ #centtable { width: 650px; text-align: justify; font-family: "Trebuchet MS", Arial, sans-serif; } /* About Us Page */ and my second css was specifically done to try and fix my footer: Code: * { padding: 0; } .wrapper { min-height: 100%; height: 100%; } .footer, .push { height: 500px; } My second css is a modification of a sticky footer code: Code: * { margin: 0; } html, body { height: 100%; } .wrapper { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -142px; /* the bottom margin is the negative value of the footer's height */ } .footer, .push { height: 142px; /* .push must be the same height as .footer */ } /* Sticky Footer by Ryan Fait http://ryanfait.com/ */ What I would like to get: The footer across the entire bottom of the screen. (I currently have a 1-2px ugly white space to the left of it) The footer not covering any of the text. I am open to other options for putting in my footer. Sorry this is so long but since I'm new I cannot post direct links as yet Cheers PS other important information: Tested it on Firefox 3.6.x and IE 8 and got the same results/effect Hi there, I'm new to CSS, and I have stumbled myself to where I am now, but I have two issues which are causing me problems. You can see the problem he URL http://img.photobucket.com/albums/v227/Fynci/ffsargh.jpg The code I am using is: Code: <html> <head> <!-- TemplateBeginEditable name="doctitle" --> <title>Rack & Ruin records</title> <!-- TemplateEndEditable --> <style type="text/css"> <!-- body { margin: 0px; padding: 0px; background-color: #B8C0D1; text-align: center; width: 780px; } #header { width: 100%; } #leftcol { float: left; width: 350px; height: 500px; } #biographyinfo { font-size: 80%; text-align: justify; padding-top: 10px; } #rightcol { float: left; width: 420px; height: 500px; } #biography { font-size: large; color: #000000; float: left; width: 300px; text-align: left; } #artistimage { height: 300px; width: 300px; float: left; padding-bottom: 10px; } #content { float: left; width: 30px; height: 500px; } #artistname { font-size: large; color: #000000; text-align: left; padding-bottom: 10px; } #footer { clear: both; width: 100%; } #albumart { float: left; height: 100px; width: 100px; padding-right: 5px; } #artistnews { font-size: 60%; text-align: justify; float: left; width: 330px; } #links { font-size: large; color: #000000; float: left; width: 300px; text-align: left; padding-top: 10px; } #artistnewsheader { font-size: large; text-align: left; width: 350px; padding-top: 10px; padding-bottom: 10px; } #Linksarea { font-size: 80%; text-align: justify; padding-top: 10px; } #albmuinfo { font-size: 60%; height: 100px; text-align: left; width: 350px; } #otherheader { font-size: large; text-align: left; width: 350px; padding-top: 10px; padding-bottom: 10px; } #othertext { font-size: 60%; text-align: justify; float: left; width: 330px; } --> </style> <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --> <link href="../new.css" rel="stylesheet" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head> <body> <div id="header"><a href="../index.html"><img src="../images/rackandruinlogo.gif" alt="Rack & Ruin records" width="780" height="127" border="0" /></a></div> <div id="nav"> <ul> <li><a href="../news.php">News</a></li> <li><a href="../artists.php">Artists</a></li> <li><a href="../releasesfull.php">Releases</a></li> <li><a href="../live.php">Live</a></li> <li><a href="../links.php">Links</a></li> <li><a href="../about.php">About</a></li> <li><a href="../contact.php">Contact</a></li> <li><a href="http://www.myspace.com/rackandruinrecords" target="_blank">Myspace</a></li> <li><a href="http://www.rackandruinrecords.com/forum/" target="_blank">Forums</a></li> <li><a href="http://rsspect.com/rss/rackandruinrssfeed.xml" target="_blank">RSS</a></li> </ul> </div> <div id="artistname"><!-- TemplateBeginEditable name="Name" -->Artist<!-- TemplateEndEditable --></div> <div id="leftcol"> <div id="artistimage"><!-- TemplateBeginEditable name="Artistimage" --><img src="" alt="Artist" name="artistimage" width="300" height="300" class="imageborder" style="background-color: #B8C0D1"><!-- TemplateEndEditable --></div><div id="biography">Biography <div id="biographyinfo"><!-- TemplateBeginEditable name="biography" -->Content for id "biographyinfo" Goes Here<!-- TemplateEndEditable --></div> </div> <div id="links">Links <div id="Linksarea"><!-- TemplateBeginEditable name="Linksarea" -->Content for id "Linksarea" Goes Here<!-- TemplateEndEditable --></div> </div> </div> <!--Left section --> <div id="rightcol"> <div id="albumart"><!-- TemplateBeginEditable name="albumart1" --><img src="" alt="" name="albumart" width="100" height="100" style="background-color: #B8C0D1"><!-- TemplateEndEditable --> </div> <div id="albmuinfo"><!-- TemplateBeginEditable name="albuminfo" -->Content for id "albuminfo" Goes Here <!-- TemplateEndEditable --></div> <div id="gap"></div> <div id="artistnewsheader"><!-- TemplateBeginEditable name="artistnewsheader" -->Artist News<!-- TemplateEndEditable --> <div id="artistnews"><!-- TemplateBeginEditable name="artistnews" -->Content for id "artistnews" Goes Hee<!-- TemplateEndEditable --></div> </div> <div id="gap"></div> <div id="otherheader"><!-- TemplateBeginEditable name="otherheader" -->Other<!-- TemplateEndEditable --> <div id="othertext"><!-- TemplateBeginEditable name="othertext" -->Other text<!-- TemplateEndEditable --></div> </div><!--Right section --> <div id="gap"></div></div> <div id="footer"><img src="../images/Base.gif" alt="Creative Commons" width="90" height="33" /><br /> <span class="footertext">(c) 2008/2009 <a href="mailto:dean@rackandruinrecords.com">D.Birkett</a></span></div> </body> </html> and the new.css file is: Code: body { background-color: #B8C0D1; text-align: center; width: 780px; margin-right: auto; margin-left: auto; } .dateinfotext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: medium; color: #000000; } a:link { text-decoration: none; color: #000000; } #nav { background-color: #B8C0D1; text-align: center; padding: 10px; margin-bottom: 10px; } #nav ul { margin: 0px; padding: 0px; } #nav li { display: inline; list-style-type: none; margin-right: 10px; margin-left: 10px; } #nav a { color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: none; font-size: 85%; } #nav a:hover { color: #FFFFFF; font-size: 85%; text-decoration: none; } a:visited { color: #000000; } a:hover { color: #000000; } #gap2 { text-align: center; padding: 5px; clear: both; } .albuminfo { font-size: 60%; } a:active { color: #000000; } body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: medium; } .imageborder { border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-style: ridge; border-right-style: ridge; border-bottom-style: ridge; border-left-style: ridge; } #gap { text-align: center; padding: 5px; clear: both; } #footer { text-align: right; float: right; margin-right: 30px; margin-top: 30px; margin-bottom: 150px; vertical-align: bottom; } .texttop { vertical-align: text-top; } a { color: #000000; text-decoration: none; } .footertext { font-size: small; } .normaltext { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; text-decoration: none; } Any help or advice would be greatly appreciated! For some reason, my table (using this for a calendar) is being pushed down in my <div>. Please look this over and see if you can figure out why this is doing this. (and pay no mind to the width, I'm still working on that part) TIA Javashackgirl http://www.fit4lifehealthclub.com/index2.html I want to display text, image, videolinks in the header and footer images in my html with css.While header and footer images are displayed in the html , the intended text,image,videolinks are not displayed within the image block of header, footer.Will you please advise me the correct code in css, html to embed the text,image,videolinks inside the header and footer images. thanks http://wdcb.org/newsite/ Having some difficulty here in putting the footer at the bottom of the page. I've looked at dozens of help tools, and none of them work. I'm obviously missing something. Page code: Code: <html> <body> <div id="header"> <?php include('includes/menu_new.inc'); ?> </div> <div id="leftcol"> <div class="element"> <img alt="" src="../images/buttons/PledgeNow.jpg"> <p>This is what text underneath would look like. I know that some of our boxes on the right side can do this so we want to make sure it looks right.</p> </div> <div class="element"> <b>PLEDGE NOW</b> </div> <div class="element"> <b>PLEDGE NOW</b> </div> </div> <div id="content">Content Section dfsdf dfdf fsdf dfsdf sdfsd ghh ghgh hghtr ytgdf gfdfgdf </div> <div id="rightcol"> <div class="element"> <a href="http://iRockJazz.com/" target="_blank"><img alt="" border=0 src="../images/ads/iRJ_wdcb_tile_199pix.jpg"></a> </div> <div class="element"> <img alt="" src="../images/mini-headers/MiniHeader-FolkRoots.jpg" width="200"> <p> Our days may be dedicated to jazz, but during the evenings it's all about the folk! WDCB plays more folk and acoustic roots music than any other station in Northern Illinois. <br><br> <a href="programming/progfolkroot.php">Click here</a> to learn more. </p> </div> </div> <div id="footer"> <?php include('includes/footer.inc'); ?> </div> </body> </html> CSS code: Code: #header { position: absolute; top: 5px; left: 5px; width: 1000px; height: 182px; } #leftcol { background: #f00; position: absolute; top: 187px; left: 0px; width: 235px; } #leftcol .element { margin-bottom:15px; } #leftcol p { margin-left:5px; } #content { background: #ccc; position: absolute; top: 187px; left: 250px; width: 540px; } #rightcol { background: #f00; position: absolute; top: 187px; left: 800px; width: 200px; } #rightcol .element { margin-bottom:15px; } #rightcol p { margin-left:5px; } #footer { position:fixed; bottom:0px; width:1000px; height:100px; background:#005288; } Thank you in advance for your help. In a basic CSS single column layout with Header, Content, Footer div structure, where the page background image is defined in the Body CSS, is there a way to specify that below the Footer div, the page background does not show? Hey all, I am creating a site which sells Three 3G Mobile Phones and at the bottom of the pages i have a footer which is included into each page, see here. If you view the site in Firefox then the footer is in the correct place and rests just where the main content finishes. However in IE the footer is miles down the page creating a box effect arround the content which to be honest looks crap. If anyone would be so kind as to give me an idea why this is happening then i would be very grateful. Also, there are many sites around which give tutorials etc about text decoration and such with CSS, but i am yet to find a really good begginers tutorial on how to layout a page with CSS and Divs, does anyone know of one? Thanx for reading. CSS Code (siteInfo is the footer in question: Code: #masthead{ padding: 0px 0px 0px 0px; border-bottom: 1px solid #cccccc; width: 100%; } #navBar{ float: left; width: 15%; margin: 0px; padding-right: 2px; height: 100%; } #headlines{ float:right; width: 45%; padding-right: 2px; } #content{ float: left; width: 70%; padding: 0px 0px 0px 0px; background-color: #FFFFFF; position: inherit; } #siteInfo{ clear: both; font-size: 75%; color: #FFFFFF; padding: 10px 10px 10px 10px; text-align: center; background-color: #CCCCCC; border-top: 1px solid #107FA4; position: relative; font-weight: bold; } Edited to add CSS. I'm having a problem inserting two DIV columns (left and right) inside another DIV to get a result like the following image: http://www.geocities.com/simonc1204/image.htm What happens is that the DIVs extend outside of their containing block and into the footer below, rather than pushing it down, like so: http://www.geocities.com/simonc1204/bad.htm But, when I replace the two DIVs with some placeholder text, that works OK, with the footer being pushed down, as in: http://www.geocities.com/simonc1204/good.htm I would have thought that wrapping the two DIVs (which are absolute positioned) in a container DIV would make other block elements flow before and after them, but apparently not, and I need to understand CSS a bit more. I've reduced the problem to almost its simplest form, and by looking at the small amount of source, I'm wondering if anybody can tell me where I might be going wrong? Thanks in advance for any replies. Miner2049er. Hello, I have been working on this for over 2 days and learning plenty in the process. Yet, I have come to a roadblock. I need the footer, which is outside the main container, to extend to the height of the page. The problem is that the page height changes with each page, and will change in the future, as the info for the pages will be pulled from a database. Please have a look at the footer on my site and tell me what might be a good solution. Here's the site: http://www.caillouette.com/FriendsCSS2/index.php thanks -Sean Greetings, My example page is located here. As you can see I'm having issues on the bottom of the page. I believe I know what is causing the issue, just not how to fix it. I need it only to work in IE and at a resolution of 1024x768 and higher. I have the footer outside of the other wrappers which are set to 100% height. But wrapper_04, which does not include the header, seems to be extending past the footer the same height as the header because it is trying to be the same height as the other parent wrapper elements? Any thoughts on how I can fix this using just CSS? I do have some js which sets the height of the content_wrapper so the background image extends the full height (yellow line image on the right of the page), but it should not be affecting the rest of the page. Thanks in advance for any assistance! hey all, i have a strange problem... When the page opens the footer appears on top of the page content but if i refresh the page it goes to the bottom as expected?? really wierd can someone please help me with this? here is the page lin to see what i mean page with the problem and here is a link to me css css page Any ideas would be great. I am using firefox Thanks RF |