CSS Question

Discussion in 'Programming/Scripts' started by bswinnerton, Apr 14, 2008.

  1. bswinnerton

    bswinnerton New Member

    Hey everybody,

    I'm a little new to css. But I'm having a lot of trouble. I am trying to get my main title to display in Copperplate Gothic Light, and the rest of my site in Lucida Sans, Lucida Grande, or sans-serif. But for some reason the entire site (Only in IE, not Firefox or Safari) is in Lucida Sans, Lucida Grande, sans-serif.

    Anyways, here is my style.css can someone show me how to fix this?

    Code:
    <style type="text/css">
    
    A:link { COLOR: blue; text-decoration: underline}
    A:visited { COLOR: blue; text-decoration: underline}
    A:active { COLOR: blue; text-decoration: underline}
    A:hover { COLOR: blue; text-decoration: none}
    body {
    	margin-left: 20%;
    	margin-right: 20%;
    	background-color: #FDFDFD;
    	font-family: Lucida Sans, Lucida Grande, sans-serif;
    	font-size:11px;
    	font-color: #242424;
    }
    .style1 {font-family: Copperplate Gothic Light; font-size: 24px;}    
    .style2 {color: #990000; font style: bold;}                  
    .style3 {color: #990000;}                                              
    .style4 {font-size: 14px; color: #990000; font-weight: bold} 
    #Layer1 {
    	position:absolute;
    	left:20px;
    	top:38px;
    	width:105px;
    	height:197px;
    	z-index:1;
    	background-color: #FDFDFD;
    	font-family: Lucida Sans, Lucida Grande, sans-serif;
    	font-size: 11px;
    }
    
    </style>
     
  2. falko

    falko Super Moderator ISPConfig Developer

    I've stopped counting the hours that I've wasted fixing code so that it works in stupid IE... :mad: That browser (is it a browser?) should be forbidden... :D

    Anyway, can you try
    Code:
    body .style1 {font-family: Copperplate Gothic Light; font-size: 24px;}
    ?
     
  3. bswinnerton

    bswinnerton New Member

    =( That didn't seem to work, I have been having so much trouble with it. Here is the page:

    Code:
    Removed for privacy
    
    And here is what I have been checking to see if it works:

    http://ipinfo.info/netrenderer/index.php
     
    Last edited: May 5, 2008
  4. KenJackson

    KenJackson New Member

    I pasted your CSS page into the W3C CSS Validation Service and got these errors:

    Code:
     9   body      Family names containing whitespace should be quoted. If 
    quoting is omitted, any whitespace characters before and after the name 
    are ignored and any sequence of whitespace characters inside the name 
    is converted to a single space.
    
    13   .style1   Family names containing whitespace should be quoted. If 
    quoting is omitted, any whitespace characters before and after the name 
    are ignored and any sequence of whitespace characters inside the name 
    is converted to a single space.
    
    25   #Layer1   Family names containing whitespace should be quoted. If 
    quoting is omitted, any whitespace characters before and after the name 
    are ignored and any sequence of whitespace characters inside the name 
    is converted to a single space.
    So try this, and similarly for the other lines:
    Code:
    .style1 {font-family: "Copperplate Gothic Light"; font-size: 24px;}
    In this particular case, IE didn't actually do it wrong. Firefox and Safari are apparently just more kind and forgiving.
     
  5. bswinnerton

    bswinnerton New Member

    Hmm, Well i fixed that and made it so that there were no errors, but I'm still having the problem =( I'm about to just give up.
     
  6. Ryanmt

    Ryanmt New Member

    Do all pcs have Copperplate Gothic Light installed? Its generally a bad idea to use non standard fonts on a website, if the computer installed doesn't have them then it just chooses another font. According to google it only comes with the Microsoft Office Value Pack

    Chances are that net render service doesn't have those fonts which is why it wont work, nor will it work on my ubuntu install.

    You should make it an image in photoshop, if it needs to be dynamic look into generating it with php as you can use any font you want to do that.
     
    Last edited: May 1, 2008
  7. bswinnerton

    bswinnerton New Member

    Thats very true. Thanks!
     

Share This Page