Results 1 to 2 of 2
Thread: CSS styling for HR
Sep 7, 2007, 06:59 #1
- Join Date
- Aug 2007
- 0 Post(s)
- 0 Thread(s)
CSS styling for HR
Is it possible to have more than one background image styled for an HR tag?
Currently, I have some code written like this (pseudo-code):
<div align="center"> <img src="line.gif" style="height:1px; width:43%; vertical-align:middle;" /> <img src="middle.gif" style="vertical-align:middle;" /> <img src="line.gif" style="height:1px; width:43%; vertical-align:middle;" /> </div>
Is it possible to style this to do the same thing using an HR tag? This would be easier than doing an SSI INCLUDE call for this snippet of code.
Sep 7, 2007, 07:25 #2
- Join Date
- Jan 2003
- Hampshire UK
- 128 Post(s)
- 3 Thread(s)
In css presently you can only have one background image per element (although css3 has proposals for more).
I wouldn't use an hr anyway because it is one of those elements that can't be styled within any degree of accuracy cross-browser.
If the image is a simple divider then I would make one long image and then centre in in the bottom of the container.
Something like this:
The image is wide enough for all monitors and still only about 2k.