SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2008
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to deal with multiple browsers?

    I have created a template and it looks beautiful in firefox. Unfortunately it doesn't look as good in IE. I'm not sure how to get it to look good in both browsers. Is there a way to switch css templates for certain browsers, or are there certain tricks to use to get it to look good in both browsers?
    http://www.fla-shop.com - Interactive maps for websites
    Flash Maps for web developers

  2. #2
    SitePoint Guru bronze trophy TheRaptor's Avatar
    Join Date
    Jul 2011
    Location
    New York
    Posts
    710
    Mentioned
    40 Post(s)
    Tagged
    0 Thread(s)
    The best thing to do is code using W3C standards, then validate your code using the validator, it'll cut down on alot of problems, trust me.

    Using a css reset will help you "eliminate the discrepancies across browsers". Eric Myers' reset is one of the best around and the one I personally use. Another good starting point for your design is the blueprint framework. It gives "you a solid foundation to build your project on top of, with an easy-to-use grid, sensible typography, useful plugins, and even a stylesheet for printing" (from the blueprint website).

    Sometimes IE has issues with even the best-coded websites, in which case coders will have to use either a workaround, conditional comments or a hack. But these will cut down on a lot of problems out of the box, before you even start coding.

    If you want we can take a look at your site and tell you what you need to do in order to get it looking good in IE.

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,608
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    You will probably find that it is only antiquated versions of IE that have the problems such as IE7 and that the page displays just about the same as it does in IE9 as it does in Firefox5 (assuming you followed the standards).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,875
    Mentioned
    160 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by flash-map View Post
    or are there certain tricks to use to get it to look good in both browsers?
    Both?

    You should be aiming to make it look good in all not just FF and IE.

    Most of the differences I see are down to errors on the coders part rather than specific browser differences (although there are many differences and bugs). Usually a slight change of design or using the correct code or using code that works in the browsers you want to support is enough to make things look more consistent.

    The key to designing cross browser pages is to test at every step in the design process in the browsers you want to support. This is the easiest way to work as bugs become evident at the time and not later in the process where it is often too late to make an easy fix or make a change of tact.

    You should only seek to use hacks (or alternative code) when you know that you are faced with a bug or a browser shortcoming. Don't look at hacks as ways of fixing everything because many times it's not a bug but just that it's been coded incorrectly in the first place.

    Finally when you know its a bug and there is no alternative then you can use an IE hack (of which there are many) but please keep them to a minimum and manage them correctly.

    If you have specific problems that need looking at that post in the CSS forum with the problem and the desired outcome and we'll try and point out whether this is a bug, design flaw or just needs to be done differently


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •