Results 1 to 6 of 6

Thread: How to make my Css compatible with Firefox ?

  1. #1
    Join Date
    Dec 2008
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default How to make my Css compatible with Firefox ?

    I have a very old forum from 2001, a Pbb something ... it didn't have any css with it ... all I have is this ( see below) ... On Iexplorer everything is fine, but the fonts are really ugly on Firefox ...
    ( see my forum on http://www.levillagedemusher.com/forum/ )

    Could someone please tell me or show me how to make this lines compatible with Firefox ? or creating a new one ?

    <style type="text/css">
    BODY {scrollbar-arrow-color: #000000; scrollbar-face-color: #4776C4; scrollbar-highlight-color: #4776C4; scrollbar-shadow-color: #FFFFFF; scrollbar-track-color: #90ACDC}
    a {text-decoration: none;}
    a:hover {color: $lien2; text-decoration: underline;}
    .fonce {color: $bgcolor; font: bold 10pt; font-family: $font;}
    .moyen {color: $textcolor; font: bold 10pt; font-family: $font;}
    .clair {color: $textcolor; font: bold 10pt; font-family: $font;}
    .fonce a {color: $bgcolor; font: bold 10pt; font-family: $font;}
    .moyen a {color: $bgcolor; font: bold 10pt; font-family: $font;}
    .clair a {color: $lien; font: bold 10pt; font-family: $font;}
    .formulaire {font: bold 10pt; font-family: $font;}
    textarea, input, font-family: $font; font: bold 8pt; border: 1px solid $bordercolor; color: $textcolor;}
    .nobold {font: 10pt; font-family: $font;}
    .alerte {font: bold 10pt; font-family: $font; color: $fontalert}
    </style>

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Set the forum border to none.
    Jeremy | jfein.net

  3. #3
    Join Date
    Dec 2008
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    ok, I'll give it a try !!! thx for taking the time to answer !

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Lol, it didn't take that long, anytime. I really don't know if it will work though I think it will work.
    Jeremy | jfein.net

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The fonts look the same to me here in IE and FF. Font's are not controlled so much by css as by the fonts available to and configured for the browser that is viewing the page. You may specify any font you like in css, but if it isn't available to the browser, or if the browser is configured to override it, a default font (often set in the browser's configuration) of one sort or another will be used.

    What you can do is use the closest generic font as a fall back in your style, but even that can be (though not technically, in practice) overridden by the browser's settings.

    For example:

    Code:
    .fonce {color: $bgcolor; font: bold 10pt; font-family: $font;}
    resolves as:

    Code:
    .fonce {
    	color: #FFFFFF;
    	font: bold 10pt;
    	font-family: Arial;
    }
    Perhaps not all browsers have Arial, but that's hard to imagine. You could change it to:

    Code:
    .fonce {color: $bgcolor; font: bold 10pt; font-family: $font, sans-serif;}
    Thus insuring that if the browser didn't have Arial, it would use its default sans-serif font, which is usually something akin to Arial, but is not required to be, so ultimately could end up looking like anything in any given browser.

    And, you have other styles you didn't mention (your ddsmoothmenu.css file):

    Code:
    .ddsmoothmenu {
    -x-system-font:none;
    background:#4776C4 none repeat scroll 0 0;
    font-family:Verdana;
    font-size:12px;
    font-size-adjust:none;
    font-stretch:normal;
    font-style:normal;
    font-variant:normal;
    font-weight:bold;
    line-height:normal;
    width:100%;
    z-index:100;
    }
    
    .ddsmoothmenu ul{
    z-index:100;
    margin: 0;
    padding: 0;
    list-style-type: none;
    }
    
    /*Top level list items*/
    .ddsmoothmenu ul li{
    position: relative;
    display: inline;
    float: left;
    }
    
    /*Top level menu link items style*/
    .ddsmoothmenu ul li a{
    display: block;
    background: #4776C4; /*background of menu items (default state)*/
    color: white;
    padding: 8px 10px;
    border-right: 1px solid #FFFFFF;
    color: #white;
    text-decoration: none;
    }
    
    * html .ddsmoothmenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/
    display: inline-block;
    }
    
    .ddsmoothmenu ul li a:link, .ddsmoothmenu ul li a:visited{
    color: white;
    }
    
    .ddsmoothmenu ul li a:hover{
    background: black; /*background of menu items during onmouseover (hover state)*/
    color: white;
    }
    	
    /*1st sub level menu*/
    .ddsmoothmenu ul li ul{
    position: absolute;
    left: 0;
    display: none; /*collapse all sub menus to begin with*/
    visibility: hidden;
    }
    
    /*Sub level menu list items (undo style from Top level List Items)*/
    .ddsmoothmenu ul li ul li{
    display: list-item;
    float: none;
    }
    
    /*All subsequent sub menu levels vertical offset after 1st level sub menu */
    .ddsmoothmenu ul li ul li ul{
    top: 0;
    }
    
    /* Sub level menu links style */
    .ddsmoothmenu ul li ul li a{
    font: normal 13px Verdana;
    width: 160px; /*width of sub menus*/
    padding: 5px;
    margin: 0;
    border-top-width: 0;
    border-bottom: 1px solid gray;
    }
    
    
    /* ######### CSS classes applied to down and right arrow images  ######### */
    
    .downarrowclass{
    position: absolute;
    top: 12px;
    right: 7px;
    }
    
    .rightarrowclass{
    position: absolute;
    top: 6px;
    right: 5px;
    }
    
    /* ######### CSS for shadow added to sub menus  ######### */
    
    .ddshadow{
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    background: white;
    }
    
    .toplevelshadow{ /*shadow opacity. Doesn't work in IE*/
    opacity: 0.8;
    Verdana should also be backed up with ,sans-serif as a fall back (sans-serif is also close to Verdana). But as I say, if the browser is configured to do otherwise, anything may show up.

    There are two main ways a browser may override your selected font:

    1. By being set to use its own fonts for all pages.
    2. By being set to have different default fonts than generally expected for those times when the font you've specified is unavailable.


    Either or both of these may be set in the particular version of FF you are using to view the page. Also, font sizes specified as pixels will not change size in IE in the same way that they can in FF, if it is a matter of font size, just adjust to the proper size in the browser's view menu.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Dec 2008
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Whaoo.... let me digest that !! thx !

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
  •