[thelist] CSS Help
ben morrison
morrison.ben at gmail.com
Fri Sep 16 10:14:01 CDT 2005
> h2 {
> border-top:1px solid #333;
> border-bottom:1px solid #333;
> }
> Substitute whatever line thickness, style and color you want. No need to use
> an extra span. If you don't want the borders to exceed the width of the text
> at all, then just zero out your left and right margins and padding.
>
Headings are Block level elements the margin/padding will not have the
desired effect.
Try using an Inline element:
h2 em {padding:5px 0; border-top:1px solid #333;border-bottom:1px solid #333;}
<h2><em>bordered headline</em><h2>
> For this you will need to use a span and class. Your HTML will then end up
> looking something like:
>
> <p>Some words in your sentence <span class="productCaps">A</span>sthma<span
> class="productCaps">Q</span>uell.</p>
>
You could reduce the typing by inheritance:
p.Caps i {font-weight:bold;color:red;}
<p class="Caps"><i>A</i>sthma<i>Q</i>uell</p>
I tend to use <i> or <b> to apply styles without adding semantic
structure as in <strong> or <emphasis> is that correct??
ben
More information about the thelist
mailing list