1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

IE only CSS?

Discussion in 'Web Design & Development' started by DrP, Jul 25, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. DrP

    DrP Thread Starter

    Joined:
    Jul 23, 2005
    Messages:
    739
    How do I write CSS which I only want to be read by IE?
    I have tried the following:

    * br {line-height: 35px;}

    but Firefox is reading it and responding when I though the * meant only IE should read it...
     
  2. covert215

    covert215 Banned

    Joined:
    Apr 22, 2006
    Messages:
    2,595
    Why do you want that anyways?
     
  3. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    There's no space
    *br {line-height: 35px;}
     
  4. DrP

    DrP Thread Starter

    Joined:
    Jul 23, 2005
    Messages:
    739
    Whoops! Thought I'd tried that...
    Thanks Brendan.

    Covert215: Why do I need it? Because I can't get IE and FF to treat <br /> the same. In FF it is always larger vertically, even when I have set margin and padding to 0 and set a fixed line-height. I've found I can get around it by using the default styles for FF then adjusting the IE CSS separately.
     
  5. covert215

    covert215 Banned

    Joined:
    Apr 22, 2006
    Messages:
    2,595
    oh...didn't know that
     
  6. namenotfound

    namenotfound

    Joined:
    Apr 30, 2005
    Messages:
    3,012
    The "*" by itself is a universal selector.

    * br is like saying "br is the child of *"

    Just like:
    .hello table {font-color: red;}
    Would mean all the <table> tags within whatever element has the class of "hello" will be red.

    I know brendan already gave you the answer of having no space *br, but since he didn't explain WHY that is, I thought I would :D
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/486381

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice