How to simplify the cross browser issue in css?

gavaskar
avatar
rank newbie

newbie


Posts: 2
Joined: 2008-04-17
Location: India

Hi,

Eg: Some of div container positions misplaced by browser to browser.

How to simplify the cross browser issue in css?
Thanks if any one help me!

greg420blues
greg420blues's picture
rank Enthusiast

Enthusiast


Posts: 72
Joined: 2006-01-17
Location: Denton, TX

Box Model ...

Not sure how familiar you are with the whole CSS thang, but what you might want to consider is what happens between a Mozilla and IE-based browser.

Read up on this, it'll explain it all:

http://tantek.com/CSS/Examples/boxmodelhack.html

If you need a more layman's explanation, let me know.

Greg Altuna
BrownCo Media
http://www.browncomedia.com/

mihirc
mihirc's picture
rank Leader

Leader


Posts: 568
Joined: 2007-05-09
Location: Pune, Maharashtra, India

If ever after understanding

If ever after understanding the box model hack, and implementing it, the site still is out of layout, try using Browser specific CSS'es, for example.

Also as a Golden Rule, alwaays walways, design the site in Firefox and then use the following code to fix it in IE. You can do the same for IE7.

<!--[if IE 6]>
Your CSS here.
<![endif]--> 

Hope that helps,

Mihir. Smiling

greg420blues
greg420blues's picture
rank Enthusiast

Enthusiast


Posts: 72
Joined: 2006-01-17
Location: Denton, TX

All I can say is ...

mihirc wrote:
If ever after understanding the box model hack, and implementing it, the site still is out of layout, try using Browser specific CSS'es, for example.

Also as a Golden Rule, alwaays walways, design the site in Firefox and then use the following code to fix it in IE. You can do the same for IE7.

<!--[if IE 6]>
Your CSS here.
<![endif]--> 

Hope that helps,

Mihir. Smiling

WORD. Well put ...

Greg Altuna
BrownCo Media
http://www.browncomedia.com/

mihirc
mihirc's picture
rank Leader

Leader


Posts: 568
Joined: 2007-05-09
Location: Pune, Maharashtra, India

Quote:WORD. Well put

Quote:
WORD. Well put ...

Did not get what that meant...

Mihir. Smiling

Ed Seedhouse
Ed Seedhouse's picture
rank Guru

Guru


Posts: 2521
Joined: 2005-12-14
Location: Victoria British Columbia

gavaskar wrote:Hi, Eg: Some

gavaskar wrote:
Hi,

Eg: Some of div container positions misplaced by browser to browser.

How to simplify the cross browser issue in css?

1. Always write semantic html.

2. Always make your html valid - every line. CSS too. Validate frequently!

3. ALWAYS use a doctype (necessary for point [2] above anyway).

4. Always use a STRICT doctype.

5. NEVER use deprecated tags.

6. AVOID putting IE into "quirks" mode by never putting any code or comments before the doctype line.

7. Code to a compliant browser, get it looking right, then and only then fix it up for IE.

8. Never use tables for layout. It's fine and correct to use them for semantic markup of tabular data, though. But NEVER for layout.

9. IGNORE layout issues while coding your html (Why? See point 1!).

10. KNOW WHEN and WHY TO BREAK THE RULES.

Together, those will go most of the way.

I could change my plea to guilty,
but I don't think it would stick.

Ed Seedhouse

gavaskar
gavaskar's picture
rank newbie

newbie


Posts: 2
Joined: 2008-04-17
Location: India

voice-family: "\"}\"";

Explain how it is work.
voice-family: "\"}\"";

greg420blues wrote:
Not sure how familiar you are with the whole CSS thang, but what you might want to consider is what happens between a Mozilla and IE-based browser.

Read up on this, it'll explain it all:

http://tantek.com/CSS/Examples/boxmodelhack.html

If you need a more layman's explanation, let me know.