SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Descendant Selectors - Advanced use breaks in FF

    I have this css:

    .note {
    FONT-SIZE: 12px;
    COLOR: #000000;
    margin-top: 1em;
    margin-bottom: 1em;
    }
    .noteTitle{
    text-transform : uppercase;
    font : normal;
    }
    .esd .noteTitle, .caution .noteTitle, .caution_hot .noteTitle, .electric_shock .noteTitle, .danger .noteTitle, .biohazard .noteTitle{
    font : bold;
    }
    .warning, .warning .noteTitle{
    font : bold italic;
    }

    And when I apply it to this code:

    <div class="note warning"><div class="noteTitle">WARNING:</div><div class="noteBody">A note of type Warning has a class = "note warning".</div></div>

    It applies the .note styles, but then ignores everything else in Firefox. In works fine in IE, and theoretically should work in FF. Any ideas?

  2. #2
    Ding Fries are Done! inter4design's Avatar
    Join Date
    Mar 2003
    Location
    usa
    Posts
    386
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try this

    Code:
    	.note {
    FONT-SIZE: 12px;
    COLOR: #000000;
    margin-top: 1em;
    margin-bottom: 1em;
    }
    .noteTitle{
    text-transform : uppercase;
    font : normal;
    }
    .esd .noteTitle, .caution .noteTitle, .caution_hot .noteTitle, .electric_shock .noteTitle, .danger .noteTitle, .biohazard .noteTitle{
    font : bold;
    }
    .warning, .warning .noteTitle{
    font-weight: bold;
    font-style: italic;
    }
    DoesItMatter
    - anyone seen my underwear?

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    That was absolutely it. FF didn't like the "font" definition missing all the other pieces, so I've changed it to use the actual attribute of font that I want to edit, such as font-weight.

    Thanks so much! I should have caught this!

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The font shortcut property must include font size and font family, and may include font style, font variant, font weight and line height.

    Omitting font size and/or font family renders the whole property/value pair invalid and, per specification, it should be ignored.
    Birnam wood is come to Dunsinane


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
  •