Previous Message
Next Message

Re: [css-d] Hello - new list member with beginner css questions

Sent by drt - lists on 31 January 2002 11:11


Let me first say the response I have gotten on this list in a few minutes is
far more informative than the reponses I received from another list in about
6 months of posting questions.

on 31/1/02 4:54 pm, aardvark at [EMAIL-REMOVED] wrote:

>> From: Rijk van Geijtenbeek [EMAIL-REMOVED]>
> [...] 
>> <p>Some text with a <span style="color:red;">special</span> word in
>> it.</p>
>> Of course, this doesn't offer any advantage above the FONT tag.
>> This is better:
>> <p>Some text with a <span class="special">special</span> word in
>> it.</p>
>> ... and in your stylesheet:
>> .special {color: red;}
> neither of these really offers much advantage over the <font> tag...
> sure, you're now maintaining the color in one place, but believe it or
> not, you've just embedded style into your page anyway...

Letting me know about <span> was a great step forward. I have figured out
how to add classes to existing tags, but when I only wanted to apply a
color, it didn't seem to make sense o use the other tags I had listed.

> since the sole purpose of that <span> is to apply a style, it's as
> bad as having a <font> (IMO)...  what happens if you don't want it
> styled anymore?  do you cut all the <span> as if they were
> <font>s, or just unstyle the class in your CSS?

Very valid point. I would use this in a limited fashion, and the suggestion
for naming the class something descriptive, other than by a color name makes
lots of sense.

I expect that in general, I would use the properly defined tag for the
proper function - e.g. H4 with a class of say pagehead for adding color to
specific places on the top part of the page. It was the changing color (or
one single font attribute) that was very much confusing me.

> the point is, and not a lot of people completely agree with me on
> this, your markup should do two things:
> - impart structure (like your <div>s in a CSS layout, or your <h#>
> tags do to imply hierarchy)

I think I just read someplace that you are not supposed to use <div> anymore
either? Can this be true?

> - impart syntactical/semantic meaning (like <em> and <strong>
> do, or better yet, <abbr>, <acronym>, <cite>, etc.)

What is the benefit of the latter tags over the former ones? I have removed
most of my <B> tags and replaced them with <strong> already.

I really want to get my sites more current. After eveluating my server log
files for the past while, it does seem that about 98% of the browsers
currently accessing my site  all support at least basic CSS1. I do not know
however if WebTV supports CSS or not.

A final question, for my footer navigation (the whole site will be changing
in a few months, but I felt adding and learning CSS now is a good step
towards a complete redesign) I would like to have smaller text and no
underline for visited or link (but show the underline for hover and active).

So I believe I would have the following in my stylesheet

a:link      {text-declaration: none}
a:visited   {text-declaration: none}
a:hover     {text-declaration: underline}
a:active    {text-declaration: underline}

Or should I do something like:

a:footer:link      {
    text-declaration: none
    font-size: .83em

a:footer:visited   {
    text-declaration: none
    font-size: .83em

a:footer:hover     {
    text-declaration: underline
    font-size: .83em

a:footer:active     {
    text-declaration: underline
    font-size: .83em

Thanks again, this list has already helped me a great deal and has gotten me
a bit more excited about tackling the 1200 html and include files that make
up my site!

Sent using the Entourage X Test Drive.
Previous Message
Next Message

Message thread: