Results 1 to 5 of 5
  1. #1
    javascript detect & CSS.
    basically ive had problems using divs instead of tables working in most common browsers and platforms, but i refuse to be beaten and believe my best bet now is to detect on index page which platform/browser and then use the desired css file.

    I only have 2. ie.css and mozilla.css which i think should cover most.
    So i tried using this

    but when i type in the header code
    <link rel = "stylesheet" type = "text/css" href = "css/main.css" />
    <script type = "text/javascript" src = "/js/browser_detection.js"> </script>
    <script type = "text/javascript>browser_css( ); </script>

    it messes up cos the "text/javascript>browser_css( ); doesnt seem to be closed. so i made a file and have checked the file names and that the directories are right but still no go it is not picking up different css files just using the default main.css

    if anyone has time or has done this before can u post the code i put in the head and the code i need in the file.js ? thanks.

  2. #2
    if anyone is interested to use divs instead of tables and maintain browser compatability use javascript detectection which chooses 2 css files that u create, a IE one and mozilla one.

    theres a basic, easy tutorial at

  3. #3

    muso's Avatar
    Member Since
    Jan 15, 2003
    Whangarei, New Zealand
    You might like to have a look at this site design2 -, in particular this article -
    I'm in your forums, writing sentences in a grammatically acceptable manner.

  4. #4
    thanks muso.
    thats a good read & resource.

  5. #5

    Member Since
    Dec 11, 2004
    14" iBook 1.33 G4, 768 MB RAM, 60GB HD

    you might also wanna check this link out:

    set css templates that are pretty much consistent in a lot of browsers [dunno if all of them are]


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 08-17-2011, 08:41 PM
  2. Replies: 0
    Last Post: 03-12-2011, 03:49 PM
  3. JavaScript
    By hesam63 in forum Web Design and Hosting
    Replies: 1
    Last Post: 07-25-2010, 12:13 PM
  4. How to detect apple key in Javascript
    By Murtaza.Tinwala in forum macOS - Apps and Games
    Replies: 4
    Last Post: 08-23-2006, 04:04 AM

Posting Permissions

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