Page 1 of 1
having trouble with footer
Posted: Sun Jul 24, 2011 5:05 pm
by kdresher
I have been working off a you tube tutorial but for some reason the navigation and content doesnt stop where the footer is located. I have watched the video a few times but all my code matches with what is on video, except his works and mine doesnt. Perhaps its something small i keep looking over. Any help would be greatly appreciated.
body {
background-color: #C4C4C4;
}
#header {
background-color: #898989;
width: 800px;
color: #FFFFFF;
font-size: 18pt;
border: 1px solid #000000;
}
#container{
overflow: hidden;
}
#navigation {
background-color: #454545;
width: 179px;
float: left;
margin-bottom: -32767px;
padding-bottom: 32767px;
border-left: 1px solid #000000;
border-right: 1px solid #898989;
}
#nav_div{
padding: 10px;
}
#con_div{
padding: 10px;
}
#content {
background-color: #DDDDDD;
width: 620px;
float: left;
margin-bottom: -32767px;
padding-bottom: 32767px;
border-right: 1px solid #000000;
}
#footer {
background-color: #898989;
width: 800px;
color: #FFFFFF;
font-size: 12pt;
border: 1px solid #000000;
}
Re: having trouble with footer
Posted: Sun Jul 24, 2011 8:36 pm
by McInfo
The scant details you have provided confirm your knowledge of my superb mind-reading ability. Indeed, I have read your mind to supplement the particulars you felt were unnecessary to put in writing, and have assembled a comprehensive solution to your problem. Because I know that you are likewise skilled at clairvoyance, I do not feel it necessary to put my findings in writing. It will be our little secret.

Re: having trouble with footer
Posted: Mon Jul 25, 2011 5:06 pm
by kdresher
Thanks for the little help you gave me, Im new at css programing and looking for a hand in why my code isnt working. At one point you were in my place not knowing anything about programming. Next newb programmer that comes onto these forums dont be so rude and give a hand/pointers.
Re: having trouble with footer
Posted: Mon Jul 25, 2011 10:23 pm
by McInfo
I am sorry if I offended you. I encounter so many posts that do not seem to consider the fact that the people reading them are not mind-readers. The only clues anyone has for solving the problem are rooted in the problem description. It is difficult to resist taking a shot at such posts. I had a moment of weakness.
The first clue I see is that the code is related to some YouTube video tutorial. That is really more frustrating than helpful. It surely would be useful to be able to watch the video and see what might be different about the code, but how am I supposed to pick the correct video out of the multitude of PHP tutorial videos on YouTube? You may be looking for something small in a haystack, but I am looking for something small in a haystack of haystacks.
The second clue is the stylesheet. That also is a dead end. Stylesheets operate on a structure of HTML tags. It is rarely possible to reverse-engineer a stylesheet to derive the HTML it is meant to style. So, without the HTML, the stylesheet is meaningless.
So the tally is two clues, two dead ends, and one snarky troll (me).
Re: having trouble with footer
Posted: Tue Jul 26, 2011 4:12 pm
by kdresher
Sorry, I thought i posted the link. Here is the link to the tut.
http://www.youtube.com/watch?v=24hVjJs6VY0 ill review the video again.
Re: having trouble with footer
Posted: Wed Jul 27, 2011 7:59 pm
by McInfo
In
header.php, add a
doctype so Internet Explorer does not render the page in Quirks Mode. The HTML 5 doctype used here is not yet standard, but it does solve your problem in IE9.
In Firefox, the page renders as intended with or without the doctype, which is why the problem did not appear in the videos.
I watched a few of those videos and fought my way through a swarm of advertisements to downloaded the code via the link in the video description (I should have disabled JavaScript). After browsing the code and listening to the way the author explains what he thinks he is doing, I am not entirely impressed.
There are a number of problems with the site. The most glaring defect is the protect() function which double-escapes the input. The author seems to not fully understand the concept of escaping.
Another reason for concern is the design of the database. The id field in each table is auto-incremented, even though it is meant to be a foreign key referencing the user table. The id in the user table should be auto-incremented, but not the others. The tables could easily become unsynchronized.