Previous Message
Next Message

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

Sent by Rijk van Geijtenbeek on 31 January 2002 14:02


On Thursday, January 31, 2002, drt wrote:

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

Good to hear.

[..]

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

You might want to read one of these, to get a full grasp of the
possibilities of CSS1:

http://www.htmlhelp.com/reference/css/

http://www.w3.org/TR/REC-CSS1
  It's quite readable, actually, much easier than the CSS2 spec, and
  almost everything actually works in MSIE6/MacIE5, Mozilla and Opera.
                   
[..]

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

I don't like DIV that only contain plain texts - I always put in P
elements. But to group soem elements together, DIV is very useful. For
example, that footer you mention later on in your message.

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

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

They put more meaning into your structure. The more info, the better.
Who knows, it might come in handy later. abbr and acronym have no
special rendering of their own, but it doesn't hurt any browser
either, and in some browser you can apply styles to these elements.

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

Some of it. Fonts and colors and simple selectors should be no
problem.

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

dl> So I believe I would have the following in my stylesheet

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

That would affect all links.

dl> Or should I do something like:

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

You meant
  a.footer:link
of course... There is no pseudo-class named 'footer'.

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

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

That would make your links extremely small, as a link can be both
'link' and 'hover' at the same time, so the font size becomes
0.83*0.83=0.6889. It gets even funnier when you activate a link...

And in Opera you get the same effect even for 'link' and 'visited',
but that's a bug as a link can't be both 'link' and 'visited' at the
same time.

I would suggest
div.footer a {font-size: .83em; }
div.footer a:link, div.footer a:visited  {text-decoration: none; }
div.footer a:hover, div.footer a:active  {text-decoration: underline; }



Greetings,
 Rijk                            [EMAIL-REMOVED]

Mot du Jour:
All generalizations are bad.
Previous Message
Next Message

Message thread: