How would I make everything in the left nav bar bold, while leaving everything else as is?
http://www.cisites.com
| SitePoint Sponsor |
How would I make everything in the left nav bar bold, while leaving everything else as is?
http://www.cisites.com
define a class with the following attribute:
Font-Weight: Bold;
But how exactly would that be done? I put the font-weight description in there, but the whole page turned bold.
The following in your header:
The following in your page:Code:<STYLE> .bold {Font-Face: blah; color: blah; text-decoration: blah; font-weight; bold;} </STYLE>
I like to use the font tag when defining things in CSS, basically because it'll only define font attributes, if I define them in the A tag it'll only work for links, if I define them in a p tag I get a new paragraphy. But in anycase in just about any tag you can enter class="bold" and it'll make the text inside bold.Code:<font class = "bold">Text to be bold</font>





cisites
The best thing to do would be to go and check out what http://www.webmonkey.com has to say about Stylesheets. Or you can view source on someones page. Here is a good example of the syntax for Stylesheets. http://www.dreamingpig.com/nacho It's a site that I built for my dog so it's nothing special, but the code is clean and I use stylesheets quite a bit.
Good luck...stylesheets are way cool
Still not working right...
Here is what you have in your header:
First of all remove those comment tags and format that up:Code:<style type="text/css"> <!--body { font-family: "Verdana"; font-weight: bold;} a { text-decoration: none; }--> <!--td {font-size: 10pt; } --> </style> </head>
Now to do what you want, make it look like this:Code:<style type="text/css"> body { font-family: "Verdana"; font-weight: bold;} a { text-decoration: none; } td { font-size: 10pt; } </style> </head>
And everything within a table cell should be bold.Code:<style type="text/css"> body { font-family: "Verdana"; font-weight: bold;} a { text-decoration: none; } td { font-size: 10pt; font-weight: bold;} </style>
You can define CSS properties by Tags or classes or both.
A.NAV {text-decoration etc etc etc} - Example of Both
.NAV {text-decoration etc etc etc} - Class Example
A {text-decoration etc etc etc} - Tag Example
The first example will effect text within A tags that are also of the class "nav"
The second example will effect text within any tag that is class "nav"
The third example will effect text within A tags so long as there is not a class definition that supercedes it.
Chris





Aspen...you know that if you style a table cell, it won't show up properly in Netscape. Your best bet would be to use a class. Like this:
.td_bold {font-size: 10pt; font-weight: bold; }
Then you apply that class to a span tag like this.
<span class="td_bold">this text will be bold</span>
It is little more coding, but it will help ensure the whole cross-platform issue.
Bookmarks