Problem
I am working on a project to theme a website, but I am not allowed to change the HTML or JavaScript. I can only update the CSS stylesheet and add/update images.
Requrements
- I need to style a h3 tag to have an underline/border after the content.
- This h3 will be used multiple times on the page, so the conent length can vary
- The solution needs to be cross-browser (IE 6/7/8, FF 3, & Safari)
Sample Code
<div class="a">
<div class="b"><!-- etc --></div>
<div class="c">
<h3>Sample Text To Have Line Afterwards</h3>
<ul><!-- etc --></ul>
<p class="d"><!-- etc --></p>
</div>
</div>
Sample Output
Sample Text to Have Line Afterwards ______________________________________ Another Example __________________________________________________________ And Yet Another Example __________________________________________________
Notes
- I think #sample:after { content: "______"; } option wouldn't work since that would only be the correct length for one of the tags
- I tried a background-image, but if it gave me problems if I gave it one with a large width
- Using text-indent didn't see to give me the effect I was looking for
- I tried a combination of border-bottom and text-decoration: none, but that didn't seem to work either
Any ideas would be much appreciated!