Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Padding Issues With IE and Firefox
Old 12-12-2007, 04:05 AM Padding Issues With IE and Firefox
Novice Talker

Posts: 7
Name: Tyler Walters
Trades: 0
I am coding my first webpage with CSS and I am running into a problem with the padding. I have researched it on the web and on this forum and I have seen I am not alone in this problem but I still can't find a solution.

The problem is the text lines up differently on IE and Firefox. From what I have read it sounds like IE does not conform to the standards for the box model.

Here are some screenshots of the website I am working on:
http://andybearwalters.com/images/iess.jpg IE
http://andybearwalters.com/images/firefoxss.jpg Firefox

The website can be found at http://andybearwalters.com/home.html .

Here is the code:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Andy Walters Memorial Website</title>
<style type="text/css">
body {
background: #27282c;
font-family: verdana;
font-size: 80%
}
h1 {
text-align: center
}
#container {
background: url(http://andybearwalters.com/images/background.jpg) repeat-y;
width: 770px;
margin: 0 auto;
}
#header {
height: 175px;
background: url(http://andybearwalters.com/images/header.jpg) no-repeat;
}
#footer {
background: url(http://andybearwalters.com/images/footer.jpg) no-repeat;
height: 37px;
padding-left: 535px;
clear: both;
}
#content {
width: 485px;
float: left;
margin-top: -30px;
padding-left: 17px;
}
#navigation {
width: 190px;
float: left;
margin-top: -10px;
padding-left: 40px;
}
</style>

</head>
<body>

<div id="container">
<div id="header">
</div>
<div id="navigation">
<b>Navigation</b>
<p>Home
<br>Pictures
<br>Videos
<br>Obituary
<br>Etc
<br>Etc
<br>Etc
</p>
</div>
<div id="content">
<h1>Andy Walters Memorial Website</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure
dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla
facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit
augue duis dolore te feugait nulla facilisi.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure
dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla
facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit
augue duis dolore te feugait nulla facilisi.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure
dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla
facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit
augue duis dolore te feugait nulla facilisi.</p>
</div>
<div id="footer">Copyright &copy; <a href="mailto:tyler@tylerwalters.com">Tyler W. Walters</a>
</div>
</div>

</body>
</html>
I would appreciate any help with this. The website is very important to me and I want to get it right. A lot of family members will be visiting the site when it is done and they mostly use IE.

Last edited by imafrknninja; 12-12-2007 at 04:06 AM..
imafrknninja is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-12-2007, 06:39 AM Re: Padding Issues With IE and Firefox
Novice Talker

Posts: 8
Trades: 0
I ve had the same problems and I think you better use % instead of px.
I am a begginer myself with css but this what people here suggested to me.
SmokyMo is offline
Reply With Quote
View Public Profile
 
Old 12-12-2007, 06:54 AM Re: Padding Issues With IE and Firefox
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
use a full, valid doctype to put IE into strict mode and it will improve

http://www.w3.org/QA/2002/04/valid-dtd-list.html
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-12-2007, 05:26 PM Re: Padding Issues With IE and Firefox
Novice Talker

Posts: 7
Name: Tyler Walters
Trades: 0
Thanks for the replies. I really appreciate the help. chrishirst, I added the full doctype and it worked perfectly. Completely fixed the problem. Thanks again for the help.
imafrknninja is offline
Reply With Quote
View Public Profile
 
Old 12-13-2007, 01:11 AM Re: Padding Issues With IE and Firefox
Novice Talker

Posts: 7
Name: Tyler Walters
Trades: 0
Hmm, it turns out it fixed it for me on IE7 but previous versions are still not lining up right. I am going to try a few things but if anyone has any more ideas please let me know.
imafrknninja is offline
Reply With Quote
View Public Profile
 
Old 12-13-2007, 02:42 AM Re: Padding Issues With IE and Firefox
Novice Talker

Posts: 7
Name: Tyler Walters
Trades: 0
I found a solution that worked for IE6. Just wanted to say so here so no one goes out of their way trying to help me out.

If anyone is interested or runs across a similar problem I found the solution here: http://www.webcredible.co.uk/user-fr...etection.shtml.

Basically, it calls for inserting a code that IE can't read so I can set certain padding and width for IE then overwrite that with code for Firefox, Opera, Netscape, etc. Check out that website. They explain it very well.
imafrknninja is offline
Reply With Quote
View Public Profile
 
Old 12-13-2007, 05:52 AM Re: Padding Issues With IE and Firefox
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
They are called "CSS hacks" and it's not something we recommend as a good practice.

Using IE's conditional comments is a much safer way to tackle IEs "quirks"

http://www.webmaster-talk.com/css-fo...s-for-ie6.html
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-13-2007, 06:40 PM Re: Padding Issues With IE and Firefox
Novice Talker

Posts: 7
Name: Tyler Walters
Trades: 0
I changed it again and got it to work with conditional comments. Thanks again.
imafrknninja is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Padding Issues With IE and Firefox
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.84252 seconds with 12 queries