This Article From Evolt Is Fantastic!

R

Richard

Check it out!


Nothing new.
Many of those items have already been discussed here in this group.
They suggest using the "font" element and notating each and every item
within it.
Why?
What if I only want to use font-family and font-size?
The rest is wasted time and effort.
Making a container to hold your working divisions in is nothing new.
I've been making that suggestion for well over a year.
Besides, those tricks can be found all over the web.
 
S

Steve Pugh

Richard said:
Nothing new.

Not to me, but to you? I'll bet good money that you didn't know all 10
beforehand. After all, number 9 is one that I've had to explain to you
more than once.
Many of those items have already been discussed here in this group.

Repeatedly. Numbers 7, 8 and 10 are very common questions here and in
ciwas. So obviously people need to be told about them.
They suggest using the "font" element and notating each and every item
within it.

No they don't. They suggest using the font property not the font
element.

It saves typing.
What if I only want to use font-family and font-size?
The rest is wasted time and effort.

Then that's all you need to specify. Those are the two values that
_must_ be specified when using the shorthand, everything else is
optional.
Making a container to hold your working divisions in is nothing new.
I've been making that suggestion for well over a year.

Every time I've seen you suggest it, it has not been for the reason
given in number 6, in fact usually it's been for no reason at all.
Besides, those tricks can be found all over the web.

Probably a sign that bringing them together in one place was a good
idea.

That said I was less than impressed when I first saw that list when it
was first published last autumn and I'm no more impressed upon
rereading it. About half the items are useful but the other half can
be very dangerous if not used properly and there simply isn't enough
explanation given and no links to further reading.

Steve
 
L

Lauri Raittila


Notice that using #5 luses content on CSS capable browser with images
disabled. (which is what I, and many others do when using modem.)

#8 lies, CSS has many ways to vertically center, only problem is that IE
don't know them. BTW, just come to my mind. Only problem is that you
can't use percentage or positioning for height. And if you know other
measures, it is just as easy to center vertically, and avoid problem with
wrapping text.
 
R

rf

Richard said:
Nothing new.
Many of those items have already been discussed here in this group.
They suggest using the "font" element and notating each and every item
within it.
Why?
What if I only want to use font-family and font-size?
The rest is wasted time and effort.
Making a container to hold your working divisions in is nothing new.
I've been making that suggestion for well over a year.
ROFL

Besides, those tricks can be found all over the web.
 
R

rf

Toby Inkster said:
http://www.evolt.org/article/Ten_CSS_tricks_you_may_not_know/17/60369/index.html

Pretty good article. Most of them I already knew, but I certainly learnt
from #4

http://www.w3.org/TR/REC-CSS2/cascade.html#important-rules

I'm not so sure that this is correct. The recomendation says nothing about
"taking precidence over what appears after", only about taking precidence
over what is in a user style sheet, a totally different thing. I think this
may be an example of where IE is actually doing it right.

Even Mr Korpela is confused about this one in the @media print thread.

Yep. Been doing it for years. It also makes a Big Difference when your row
of menu "buttons" wrap.
 
M

Michael Winter

rf wrote:

[!important taking precedence in author rules]
I'm not so sure that this is correct. The recomendation says
nothing about "taking precidence over what appears after", only
about taking precidence over what is in a user style sheet, a
totally different thing.

Read the last two sentences in the paragraph prior to the example:

"Also, the third author rule will lose to the second author rule
since the second rule is "!important". This shows that "!important"
declarations have a function also within author style sheets."
I think this may be an example of where IE is actually doing it
right.

What were you thinking? :p

[snip]

Mike
 
T

Toby Inkster

rf said:
http://www.w3.org/TR/REC-CSS2/cascade.html#important-rules
I'm not so sure that this is correct. The recomendation says nothing
about "taking precidence over what appears after",

It doesn't need to. An author's "!important" rules take precendence over
the author's normal rules no matter what the order.

p {
color: magenta;
color: green !important;
color: red;
}

The colour of the paragraph should be green.
only about taking precidence over what is in a user style sheet, a
totally different thing.

*All* author styles take precendence pver user styles (except the user's
"!important" styles -- they over-rule everything!)
I think this may be an example of where IE is actually doing it right.

It's not. I don't think there are any examples where IE is the only
browser to get it right with CSS. (Perhaps with Javascript, yes, but not
CSS.)
Even Mr Korpela is confused about this one in the @media print thread.

No, he has it right, though changing the order of styles in the style
sheet would have been a better way to go -- it's much more sensible to put
the screen styles first, as they will probably be made use of first.
 
S

Steve Pugh

rf said:
http://www.w3.org/TR/REC-CSS2/cascade.html#important-rules

I'm not so sure that this is correct. The recomendation says nothing about
"taking precidence over what appears after", only about taking precidence
over what is in a user style sheet, a totally different thing. I think this
may be an example of where IE is actually doing it right.

No. !important effectively moves the rule to a higher position in the
cascade and hence is a much bigger change than anything to do with
specificity and certainly much bigger than anything to do with order
in the code (which is only used as a tie-breaker when specificity is
equal).

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top