Browsers And Css - Differences in displaying CSS

free web hosting
Open Discussion > CONTRIBUTE > The Internet > Web Design

Browsers And Css - Differences in displaying CSS

theRealSheep
(This looks like the best place to post this.. unsure.gif )

What do other users do to 'work-around' the differences in displaying CSS attributes in different browsers? Mainly Internet Explorer which doesn't fully conform to CSS unlike the Mozilla browsers and where older browsers like Netscape 4.x which have only minimal CSS implementation.

On my website, now that I have converted it to PHP, I use a couple PHP 'if' statements to detect the user's browser and link them to different style sheets, depending on their browser (IE, N4 or everything else). I did read about using some 'CSS @import hack' to trick different browsers, but I couldn't get it to work. Has any one else tried this method or do you have something better you use?

Reply

mizako
With a bit of patience a good crossbrowser result can be achieved. I design in the next Way:
- First i design for Firefox.
- Validate Markup (XHTML code) and CSS with W3C validators.
- Test the web-site with IE and Opera. Sure you will find some differences but with a fine adjustment of your CSS file you may achieve your desired effect.

Adjust for your potential visitors. IE users are important since there are more!!!.

As you can see i do not use browser detection but depending of the proyect importance maybe it is necessary in your case.

Reply

nonon
Well i would be very interested in such method...can someone post-it out? please cool.gif
Nowdays i test the site in Firefox, but i've got to do the same test on IE, i try to make something that works out well for both,i always achieve...but they do look very different as in Firefox the forms are smaller,etc,etc...

Good Luck
Cheers

Nuno

Reply

Tyssen
QUOTE(theRealSheep @ Apr 4 2005, 03:38 AM)
I did read about using some 'CSS @import hack' to trick different browsers
*



If you use
CODE
<style type="text/css" media="screen">@import "yourfile.css";</style>

it'll hide the CSS from older browsers like N4 which means they'll get all your content unstyled. If you're creating your site with tables this can look quite unsightly, but if you've created your site using valid XHTML mark-up, it will be better (although everything will be unstyled, no background images etc.)
(For an example of what I'm talking about, check out this page. That page has lost the link to its CSS. If you scroll down to the bottom of the page and click on any of the links under Designs, you'll see what it should look like.)
Like Mizako says, you should be able to code everything into the one stylesheet to get all modern browsers to display your page properly and I use the same sort of process he/she does when designing: start with Firefox then get it right in the others.
I personally wouldn't bother trying to get your pages to work in N4 or earlier - I think less than 1% of the browser market still use those.

 

 

 


Reply

rvovk
I agree on doing site in valid XHTML and CSS code. This will ensure to have it properly displayed in Mozilla Firefox and probably Opera. Next thing you must do is to check it in Internet Explorer. YOu will probaly have to make IF variables for some elements to be properly displayed. I really don't bother with IE4 and NN4 browsers. I like to have site properly displayed in Internet Explorer 6.0, Firefox and Opera. Internet Explorer 5.0 and 5.5 need more of workaround, but it can be done.

Good thing to check is W3C School.

Reply

Tyssen
QUOTE(rvovk @ May 25 2005, 01:50 AM)
YOu will probaly have to make IF variables for some elements to be properly displayed.

Not if you get your CSS right. It's possible to make your page look nearly exactly the same (font-size variations prevent absolute similarity) by careful CSS coding. It does take a while to get your head around all the tricks & hacks that you sometimes need to use to get things to look right in IE, but it's like anything else: once you know how to solve a particular problem, you're fine.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. browsers differences in css - 70.72 hr back. (1)
  2. opera ie differences css - 184.79 hr back. (1)
  3. css differences browsers - 307.17 hr back. (1)
  4. css is displayed in ie but it is displayed in mozilla - 339.35 hr back. (1)
  5. difference browser css - 344.62 hr back. (1)
  6. css hack hr mozilla - 365.04 hr back. (1)
  7. testing css differences - 421.63 hr back. (1)
  8. httphandler browser difference css - 440.17 hr back. (1)
  9. css differences in opera and explorer - 443.63 hr back. (1)
  10. difference browsers css - 458.57 hr back. (1)
  11. css différence browser - 487.87 hr back. (1)
  12. xhtml css differences firefox ie - 622.69 hr back. (1)
  13. html css browser differences - 625.00 hr back. (1)
  14. internet explorer and firefox css diferences - 650.39 hr back. (1)
Similar Topics

Keywords : browsers, css, differences, displaying, css

  1. Firefox And Ie: Table Layouts Look Different In Us!
    A Discussion on Why These Major Browsers Display Different Table Layou (3)
  2. Programming For Multiple Browsers.
    What do you think is the best way? (5)
    Hey what do you think is the best way to code a site to appear correctly on multiple browsers?
    I've been thinking about useing Javascript or think of something in PHP. Also would it be
    better for me to use a style sheet or the include or require function in PHP to increase speed for
    when I have to update my site? I know how to do these things I'm just wondering wich way is the
    most effective and the fastest.....
  3. Will Browsers Agree At Once On Standards?
    it's very difficult to learn web design (1)
    For me it seems to be the easiest way to web design in Flash;at least things are clear here and the
    code will work in all browsers...I tried to learn html(not difficult at all)and css(easy but there
    are plenty of browser gliches )and after i tried to make a simple rollover or navigation bar work in
    all major browsers without javascript only css and failed,then i started searching for a linux flash
    clone or smth to be capable of exporting flash animation with some actionscript but the ones i found
    are in a very early stage of development.Do you have any experience with f4....
  4. Desgin Websites For Multiple Browsers
    (2)
    I know most people use IE but is there a way to browse your website as if it were other versions of
    IE or even other browsers (Netscape, Opera, Firefox, etc.). I want know how I can test a website
    for those browsers and older versions of IE. Obviously one way is to downlaod all the browsers and
    test that way but it is something I am trying to avoid. Plus, I can't test older versions of
    IE. Any suggestions?....

    1. Looking for browsers, css, differences, displaying, css

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for browsers, css, differences, displaying, css

*MORE FROM TRAP17.COM*
advertisement



Browsers And Css - Differences in displaying CSS



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE