HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Programming/Scripts (http://www.howtoforge.com/forums/forumdisplay.php?f=7)
-   -   CSS Question (http://www.howtoforge.com/forums/showthread.php?t=22291)

bswinnerton 14th April 2008 04:45

CSS Question
 
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>


falko 14th April 2008 16:58

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;}
?

bswinnerton 14th April 2008 19:19

=( 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

KenJackson 15th April 2008 17:34

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.

bswinnerton 16th April 2008 20:25

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.

Ryanmt 1st May 2008 01:37

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.

bswinnerton 1st May 2008 01:57

Thats very true. Thanks!


All times are GMT +2. The time now is 12:41.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.