Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- more than one style on same line
October 15, 2003, 3:52 pm
rate this thread
As I understand it, the <s> is deprecated.
If I add <p> tags, it won't all be on one line.
<div style="font:bold 18px; color:#CC0000">
<s>REG PRICE $325.00</s> NOW ONLY $295.00!!!
Also, is there a way to control the width of the strikethrough line?
I want a thicker line if possible.
Re: more than one style on same line
The style sheet "font:bold 18px; color:#CC0000" is CSS compliant except
that the font shorthand must contain a value for font-family. It still
does not make sense, though, since you set font size in pixels and set
color without setting background. A good CSS checker would have (more
or less) told you this rather fast.
Yes, in HTML 4. This has nothing to do with CSS compliance, though.
It depends where you add them and whether you have relevant CSS rules.
But if it's a problem, why do you add them?
What's that? I've learned that triple exclamation marks are a sure sign
of trying to fool customers, but there's nothing in CSS or HTML
specification that prevents that, or SHOUTING.
No. You could simulate one by using a suitably positioned border, but
it's really not worth the effort.
Why don't you just tell what you are trying to present? What's wrong
with something like the following?
<div><strong>Now only $295.</strong> (Regular price: $325.)</div>
Why would you strike out the regular price, making it harder to see
what it is and thereby appreciate the bargain (if it is one)?
You could add some styling to <strong>, of course.
Yucca, http://www.cs.tut.fi/~jkorpela /
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html