Previous Message
Next Message

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

Sent by aardvark on 31 January 2002 17:05


> From: drt - lists [EMAIL-REMOVED]>
[...] 
> 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.

a valid point, as long as you understand that you are adding mark-
up for no other pupose than to style...

> > 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.

coolio.

> 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.

gotcha... although there's a whole new discussion of proper use of 
<h#> that i won't get into (it's not CSS, and it's been covered at 
evolt recently anyway)...

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

i doubt it... there's no other level generic block-level element 
available...

> > - 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.

semantics... supposedly screen readers can say the words 
differently... the <b> is strictly visual, while the <strong> can be 
visual but also implies importance to the content instead of just 
font weight... etc...

[...]
> 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}
[...]
> Or should I do something like:
> 
> a:footer:link      {
>     text-declaration: none
>     font-size: .83em
> }
[...]

i never set size in the a:link/visited/etc...  i usually define a class, 
and take it from there... since the only thing i use the pseudo-
classes for is usually color and underline, i only include those 
attributes (or the ones i'm using)... so i might have:

a.footer		{ font-size : 42em ; }

a.footer:link	( color : #d00d00 ; }

(yes, that's a fake color)
Previous Message
Next Message

Message thread: