Make graphics on left and right side of text change width depending on the amount of text?

Posted by Dustin McGrew on Stack Overflow See other posts from Stack Overflow or by Dustin McGrew
Published on 2012-10-15T20:59:34Z Indexed on 2012/10/15 23:02 UTC
Read the original article Hit count: 140

Filed under:
|
|
|

I need to have an H1 tag centered between two graphics on the left and right of the text. The H1 text will be various widths depending on what page you are on. The dot on the left should stay on the left edge of the site and the line should extend until it reaches the edge of the text. Same for the right side. Is there a way to accomplish this by using CSS or even some jquery/javascript?

enter image description here

In the attached graphic, if the text was just "WHO YOU ARE" I'd need the bars on the left and right to grow wider to bump up against the edges of the text.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery