[thelist] CSS Help

Pringle, Ron RPringle at aurora-il.org
Fri Sep 16 10:00:18 CDT 2005


Norman - 

> I have an <.h2> tag that I have defined in CSS.  I want to 
> put borders 
> above and below only the text in the header, not the entire 
> header box.  
> When I use a <.span> tag inside of the <.h2> with the appropriate 
> borders, it shows fine in FF but not in IE6.  Anyway to get 
> IE to work 
> as desired?

If I understand you correctly, you just want a top and bottom border above
and below the h2 header text, but not on the left and right sides correct?
If that's the case, you can define that like:

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.
 
> Another problem is in both IE and FF.  I have a product name, 
> AsthmaQuell, that I want to bold and change the colors on the 
> capitalized letters.  I have tried several kludgey ways, but 
> would like 
> something more elegant.  Has anyone attempted something like this?

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>

HTH

Regards,
Ron


More information about the thelist mailing list