View Full Version : Need Help with spacing issues in IE7
stylus1274
09-27-2008, 02:15 AM
I am a total newb and CSS hack. I am just starting on my first site and am having issues with the spacing of my DIVs in IE7. Now, in Safari and Firefox they are exactly where I want them. But when I view in IE, the spacing is totally off. Not even close. I am obviously missing a key element here. My IE DIV seems to be "sitting" higher than the other browsers. If anyone could help or point me in the right direction that would be great.
Thanks
My site for reference:
www.charlieboudreau.info
magicyte
09-27-2008, 02:27 AM
First of all, not to insult you or anything, but it is better when you do not use the word "hack" in programming. When you are a CSS "hack", some ordinary guy might think you're some hacker. I prefer "programmer", and I'm sure you would too...
What version of IE are you looking at them in? If it is 6, you need to use differing CSS code. I like the way it looks in my browser, I like it the way it is. If you REALLY need to change this, you may need to look up some CSS code for IE6 - or up! This may help you with your problem.
If you need more help, ask Nyne Lyvez for help. Search for his profile on the search engine on DD. He is REALLY good w/ CSS - (his name is Josh, so refer to him as "Josh", not "Nyne").
Hope I could help.
-magicyte
stylus1274
09-27-2008, 02:48 AM
M,
Thanks dude. I meant I am hacking this CSS stuff up. Sorry about that.
Either way I solved it. I just added a little margin. I develop on Mac and test IE7 on a HP Laptop. I prefer Mozilla and Safari but I gotta be prepared for that so called browser IE.
Thanks again
magicyte
09-27-2008, 02:53 AM
You are welcome.
-magicyte
TheJoshMan
09-27-2008, 02:57 AM
If you need more help, ask Nyne Lyvez for help. Search for his profile on the search engine on DD. He is REALLY good w/ CSS - (his name is Josh, so refer to him as "Josh", not "Nyne").
haha, I feel loved...
magicyte
09-27-2008, 02:59 AM
Uh, more of "smart" than "loved", I would say. :p
-magicyte
TheJoshMan
09-27-2008, 03:01 AM
sorry, *loved* was used loosely. LOL
magicyte
09-27-2008, 03:02 AM
I know. I was just kidding around!! :D
-magicyte
stylus1274
09-27-2008, 03:10 AM
I lied. I thought I had a fix but still do not. I guess I will try your suggestion and get a hold of Josh. IE7 is driving me mad.
TheJoshMan
09-27-2008, 03:14 AM
Welcome to the *club*
May I suggest http://www.iedeathmarch.org?
Medyman
09-27-2008, 03:48 PM
What version of IE are you looking at them in? If it is 6, you need to use differing CSS code. I like the way it looks in my browser, I like it the way it is. If you REALLY need to change this, you may need to look up some CSS code for IE6 - or up! This may help you with your problem.
You say this a lot. There isn't separate CSS "code" for IE6. IE6 has minimal CSS support (by today's standards), yes. IE browsers use a screwed up box model, yes. But if your markup and CSS are valid, the most trouble you'll have are some spacing issues (as the OP does). This is where IE-conditional style sheets might be helpful to target IE with separate dimensions to account for the IE layout model.
TheJoshMan
09-27-2008, 04:01 PM
I already fixed this problem for him via email... but I suppose I should post it up here for all to see....
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Charlie's Fixed Page</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<style type="text/css">
body {
background-image: url('http://www.charlieboudreau.info//images/gradient.jpg');
background-repeat: repeat-x;
background-color: #fff;
font-family:arial,helvetica,sans-serif;
}
div.top {
height: 332px;
position:relative;
top: 100px;
left:50px;
width:85%;
}
h1.header {
color:#fff;
font-size:32px;
font-weight:normal;
position:absolute;
top:0;
left:20px;
}
h4.subheader {
font-size:25px;
color:#4a4949;
font-weight:normal;
}
div.bottom {
position:absolute;
top:411px;
left:50px;
width:85%;
}
p.bottom {
font-size:20px;
color:#4a4949;
}
</style>
<!--[if IE]>
<style type="text/css">
h1.header {
top:15px;
}
div.top {
position:absolute;
top: 100px;
}
h4.subheader {
margin:25px 0;
}
div.bottom {
position:absolute;
top:440px;
}
</style>
<![endif]-->
</head>
<body>
<h1 class="header">Online Portfolio of Charlie <strong>Boudreau</strong></h1>
<div class="top">
<h4 class="subheader">Web Development</h4>
<h4 class="subheader">Custom Web Design</h4>
<h4 class="subheader">Conten Management Systems</h4>
<h4 class="subheader">Branding Solutions</h4>
</div><!--top-->
<div class="bottom">
<p>I <strong>Design</strong> to enhance and capture the
idea of what every client envisions for their project. We cover
everything from Flash development, Web Hosting, Company Identity
Development, Print Design, Content Management solutions and more. For
some examples of our work visit the clients list section.</p>
</div><!--bottom-->
</body>
</html>
the key thing I focused on was to get rid of the numerous paragraphs with individual styling and use structural divs instead. This way the content can be updated and/or elongated without causing issues again.
SpOrTsDuDe-Reese
09-27-2008, 11:33 PM
Umm...where exactly is the DTD...? ;)
TheJoshMan
09-27-2008, 11:41 PM
there... fixed. I also forgot to add the charset.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.