May 15, 2008

Browsers And Css - Differences in displaying CSS

Free Web Hosting, No Ads > CONTRIBUTE > The Internet > Web Design

free web hosting

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.
Confirm Code:

Recent Queries:-
  1. css differences in opera - 44.59 hr back.
  2. opera css differences - 53.50 hr back.
  3. css differences browsers - 65.37 hr back.
  4. css browsers difference - 75.59 hr back.
  5. same attribute for different browsers in css - 77.74 hr back.
  6. browser css differences - 51.88 hr back.
  7. w3c school css @import - 172.38 hr back.
Similar Topics

Keywords : browsers, css, differences, displaying, css

  1. Programming For Multiple Browsers.
    What do you think is the best way? (5)
  2. 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....
  3. 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

Searching Video's for browsers, css, differences, displaying, css
advertisement



Browsers And Css - Differences in displaying CSS



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
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