css: howto underline a block, but not the parts where it has text

I want to to get the following result:

________________Title of page

So let's say the html markup is

Title of page

and h1 is set to width: 100%and text-align:right, I want it only be underlined on the left side of the title.

Any clue how to accomplish that? I have tried to wrap the title in a

, give that a background of white and shift it a bit down, so it overlaps the bottom of the h1-box, however, I'm not sue whether this works 100% cross-browser.

0
задан Simon_Weaver 4 February 2013 в 00:16
поделиться