/    Sign up×
Community /Pin to ProfileBookmark

footer problem and small alignment issues in IE v6 and earlier

Hey everyone!

Ok, I’ve stripped my website of all graphics and formatting to make the code as easy to view as possible, but I’m at a loss. I can’t really explain it that well so here’s the link:

[url]http://theinfamousuk.com/basic.htm[/url]

When this page is viewed in Firefox, it looks exactly as it’s supposed to. When viewed in IE 7 + 8, the text in the footer at the bottom of the page is cut in half. I have no idea why! To add insult to injury (lol), when I view the page in IE 6 and lower, the layout gets a little sloppy. Its as if its all aligned to the left apart from my #content.

I have a feeling it has something to do with either my #container, or something to do with floats and my .clearfloat ? I have no clue. I do think that my little footer problem will solve its self when the layout is secure.

I’ve tried scouring the internet for answers, but if you’re not sure on what question to ask, it’s tricky

I really hope you guys can point me in the right direction – I’ve been at this for days now!

Here is the relevant CSS from the head of the page:

[code]
<style type=”text/css”>
<!–
body {
margin: 0;
padding: 0;
text-align: center;
color: #FBFBFB;
background-color: #FFF;
background-image: url(images/bg.gif);
background-repeat: no-repeat;
background-position: center center;
}
#container {
width: 680px;
margin: 0 auto;
padding: 40px 0 15px 0;
}
#banner {
height: 165px;
width: 680px;
background-color: #999;
}
#navbar{
width:720px;
height:30px;
position: relative;
right: 20px;
background-color: #666;
}
#sidebar {
float: left;
width: 176px;
padding: 10px 10px 5px 10px;
height: 400px;
background-color: #1b1b1b;
border-left-width: 2px;
border-left-style: solid;
border-left-color: #FE4343;
border-right-width: 2px;
border-right-style: solid;
border-right-color: #FE4343;
display:inline
}
#content {
padding: 10px 10px 5px 10px;
height: 400px;
width: 458px;
background-color: #0C0C0C;
overflow: auto;
border-right-width: 2px;
border-right-style: solid;
border-right-color: #FE4343;
color: #FFF;
float: right;
display: inline;
}
#footer {
height: 20px;
background-color: #1B1B1B;
}
.clearfloat {
clear:both;
height:0;
line-height: 0px;
}
.footertxt {
font-size: 10px;
text-align: right;
color: #828282;
margin: 0;
padding-top: 10px;
padding-left: 10px;
padding-right: 10px;
}
–>
</style>
[/code]

and here is the html in the body:

[code]
<div id=”container”>
<div id=”banner”>
<!– (the banner image will go here) –></div>
<div id=”navbar”>
<!– (nav bar (rollover images) will go here) –></div>
<div id=”sidebar”>
<!– end #sidebar –></div>
<div id=”content”>
<div><h1>——- News ——-</h1></div>
<div>
<h4>Feburary 10, 2009</h4>
<h5>New website needs to be finished!</h5><hr width=”95&#37;”/></div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Aenean sagittis. http://www.this-is-another-very-ver-ver-ver-ver-ver-very-long-unbreakable-URL.co.uk </p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. orem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. orem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. orem ipsum dolor sit amet, consectetuer adipiscing elit.Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. </p>
<!– end #content –></div>
<div id=”footer” class=”clearfloat”>
<p class=”footertxt”><!– #BeginLibraryItem “/Library/copyright.lbi” –>theinfamousuk.com | &#169; Copyright 2009 | All rights reserved | Contact<!– #EndLibraryItem –></p>
<!– (will have an image as the background) –></div>
<!– end #container –></div>
</body>
[/code]

I know that I ‘ve posted here before, but I thought i’d try again after revising my code and strippng it of everything to try to narrow down the problem!

I hope you guys can help – i have no clue what to do!

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@snowiekenFeb 16.2009 — Since I can't test your code on anything less than IE 7 on this computer, I can't reproduce the alignment issues.

However, the line being cut in half is most likely caused by your setting of line-height in the clearfloat div. Line-height is a quite tricky thing to use cross-browser, it largely depends on the current font size. If you remove that line you will notice that your text isn't cut in half anymore. A little bit of tweaking with the padding will get your text exactly where you want it to be (and in a complete status :p) in all browsers. I'm not exactly sure why you set the line-height to begin with, if you only have one line of text in your footer anyway.

This might get you going, I hope someone else can help you with your bigger layout issues (or maybe I can later when I'm on my other comp which is being hogged by my GF at the moment :p).
Copy linkTweet thisAlerts:
@RhydzauthorFeb 16.2009 — Hey, thanks for the reply!

I did that simple change and got it looking fine in all browsers now!

I removed the line-height line from the .clearfloat and changed padding-top to 5px in the .footertext and now everything is fine.

The only reason I know about my alignment issues is because of a cool website I found browsing these forums called:

http://www.browsershots.org

You can type in ur webpage URL and see what it looks like on basically any web browsers on all different operating systems. Cool eh?

Mine seems to look ok in all but IE 6 and lower (and some older version of Opera which im not so fussed about).

Thanks for that fix!

1 problem down, 1 more to go! ?
Copy linkTweet thisAlerts:
@snowiekenFeb 16.2009 — Wow, that's a nifty website, haven't heard of that yet and I'm a developer for quite some time now. Makes it look as if there are little gnomes on the other side of the line doing some nasty slave work typing in all these url's in different browsers and sending out screens like crazy.

Nice mental image, that is.
×

Success!

Help @Rhydz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...