works in IE but not FF

Discussion in 'CSS' started by lookingswell, Dec 4, 2007.

  1. #1
    i have in the html file

    with

    in the css file

    ...in ie, all goes as supposed to. but in ff, the color is not displayed as i specified it in the css!?!?!?!?!?
     
    lookingswell, Dec 4, 2007 IP
  2. Crimsonc

    Crimsonc Peon

    Messages:
    616
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    color attribute is for text. Try background-color

    I can't say it'll definately work because I never use HR but it's worth a shot.
     
    Crimsonc, Dec 4, 2007 IP
  3. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #3
    You have a syntax error because you didn't specify a unit for the height. 1 INCH? 1 PIXEL? 1 MM?
     
    soulscratch, Dec 4, 2007 IP
  4. vpdesigns

    vpdesigns Peon

    Messages:
    353
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    soulscratch is right...

    you need to tell it what mesurement to use px, pt, in, cm, mm, pc, em, ex and %... because its just getting confused.

    E.G.
    hr {
    height: 1px;
    width: 90%;
    color: #C0D0E0;
    }

    This should solved your problem
     
    vpdesigns, Dec 4, 2007 IP
  5. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #5
    Actually you'd have to put a background color as well.. and you might run into some crap in IE where font-size:0 will fix the height.
     
    soulscratch, Dec 4, 2007 IP
  6. zyml

    zyml Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Usually when your code works in IE6 but not in FF means that you might wanna look into your code again. :p
     
    zyml, Dec 4, 2007 IP
  7. lookingswell

    lookingswell Peon

    Messages:
    22
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    yeah...

    i put in

    hr {
    height: 1px;
    width: 90%;
    background-color: #C0D0E0;
    }

    ...and it still DOESN'T work!!! :(
    what could it possible be?
     
    lookingswell, Dec 4, 2007 IP
  8. huxen69

    huxen69 Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    wow..that was usefull stuff..
     
    huxen69, Dec 5, 2007 IP
  9. manishk

    manishk Peon

    Messages:
    63
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #9
    This will work...

    
    hr{
    color:#f00;
    background-color:#f00;
    height:1px;
    border:none;
    }
    
    Code (markup):
    You need to set the foreground and the background. Foreground for IE and background for FF. You need height also for opera. border:none is for FF again.
     
    manishk, Dec 5, 2007 IP