Lost on simple (hopefully) CSS
Posted: 14 March 2007 06:09 AM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2007-03-14

Okay, so what I’m trying to accomplish is something akin to a progress bar. I’ve been modeling what I have after this, and what I have so far includes 2 external css files and a single HTML file:

index.html

<!DOCTYPE html
    
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html>
<
head>
    <
title></title>
    <
LINK href="css/css.css" rel="Stylesheet" type="text/css">
</
head>
<
body>
    <
table width="500" align="center" class="percent" cellpadding="0" cellspacing="0">
    <
tr>
        <
td width="61%" bgcolor="khaki">FINISHED (61%)</td>
        <
td width="39%" bgcolor="white">&nbsp;</td>
    </
tr>
    </
table>
</
body>
</
html

css.css

font {
    font
-familyVerdana;
    
font-size9px;

percent.css

.percent {
    border
1px black solid;

I want to point out that I’m trying to get an exact replica, or as close as I can get to one, for the time being. As it stands now, it doesn’t even seem like any of my CSS code is working. I’ve looked through a few tutorials, but it doesn’t seem like it’s helped. Can someone point out what I’m doing wrong?

Profile
 
 
Posted: 14 March 2007 01:07 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  10
Joined  2006-10-02

You don’t need the “font” class, group all your styles in the percent class.

<!DOCTYPE html
    
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html>
<
head>
<
title></title>
<
style type="text/css" media="all">
.
percent {
    font
-familyVerdana;
    
font-size9px;
    
border1px black solid;
}
</style>
</
head>
<
body>
<
table width="500" align="center" class="percent" cellpadding="0" cellspacing="0">
  <
tr>
    <
td width="61%" bgcolor="khaki" align="center">FINISHED (61%)</td>
    <
td width="39%" bgcolor="white"> </td>
  </
tr>
</
table>
</
body>
</
html
Profile
 
 
Posted: 15 March 2007 12:40 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  2
Joined  2007-03-14

Thanks. That seems to do the trick; now if I could just get it to work with an external file..

Profile