Forum Moderators: not2easy

Message Too Old, No Replies

Display differences in Firefox and IE

Is there a solution for layout to look the same?

         

arad

9:12 am on Aug 26, 2006 (gmt 0)

10+ Year Member



When I preview the website that I made, in IE it displays correctly (or the other way around, in Firefox correctly) but in Firefox it looks different (ex: font smaller, positioning different, etc.). Is there a solution to this problem?

Thanks,
AR

lexipixel

9:24 am on Aug 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Aside from the browser's rendering engine -- you need to account for user's browser settings.

Rather than code CSS / browser "hacks". I try to keep it simple and just not use CSS parameters if they don't render the same in popular browsers.

I know that eliminates a lot of fancy stuff that can be done -- but the last thing I want to do is be forced to redesign a site because MS fixes (or breaks) something in an update.

A simple test is to use the "Text Size" setting on a browser. Increase and decrease the text side and see if your design holds up --- if this simple change drastically affects the layout, you need to rethink the design.

(And welcome to WebmasterWorld!}

arad

10:30 am on Aug 27, 2006 (gmt 0)

10+ Year Member



So you're saying that it's better to not even use CSS at all? I thought CSS was the most updated way to make websites. I got my layout to look pretty similar now in diff browsers, except for a couple of thin black lines in a few places.

AR

lexipixel

5:32 pm on Aug 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No, I am saying I avoid the CSS properties that cause the worst problems.

JAB Creations

6:35 pm on Aug 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



IECCSS

Internet Explorer Conditional Comments StyleSheet

I'd post a link to the tutorial I've been working on but I'm not sure if it's allowed (I'll ask an admin first).

However I think it would be safe to post this link to get you started...

[msdn.microsoft.com...]

- John

encyclo

8:57 pm on Aug 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld arad!

The first thing to check is what doctype you are declaring on your page. When working with CSS, you must always use a doctype which triggers "Standards-Compliance Mode" in modern browsers. Try the full version of either the HTML 4.01 Transitional or HTML 4.01 Strict doctypes: see this guide to choosing a doctype [webmasterworld.com] and Quirks Mode vs. Standards Mode - overview [webmasterworld.com] for more information. :)