Results 1 to 2 of 2

Thread: Conditional hacks

  1. #1
    Join Date
    Jan 2005
    Posts
    9

    Conditional hacks

    Hi,

    Im sure this is a common question, I searched and I havent been able to find a way around it yet...


    I want to get the css to ignore IE or Firefox.

    I dont want to change any of the HTML, for example inserting [if IE] statments.

    I have tried * html div# ... but this doesnt work for IE7, as far as i can see

    I have tried the ! important also but this does not work for IE7 either

    Is there a work around for getting the css to ignore all versions of IE or Firefox by editing the CSS only ?

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    Not by using CSS.

    You can use a javascript browser sniffer and set different stylesheets for different browsers, but I don't know the code.

    As you say, the available hacks and conditional comments in CSS work for IE but generally not for other browsers.

    See http://www.wickham43.supanet.com/tut...tionalcomments
    in the last few paragraphs.

    You can use > as in li>p which will work in CSS compliant browsers ie IE7 AND Firefox but I'm not sure which other browsers fall into this category (definitely not IE6).
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. Javascript form with quantity conditional pricing
    By simora in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 02 Feb 2007, 02:00 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
  •