I would like to have something similar to a horizontal rule (with certain height, of course) and show some text in it?
Do I really use <HR size=30, aligh="center">? How do I write some text in it?
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
you can't write text in it...
best you can do would be
JiaPei Jen
Ranch Hand
Joined: Nov 19, 2000
Posts: 1309
posted
0
I have seen in web pages that there is a horizontal bar with a color; say, green. And there is some text in the bar with another colore; say, yellow. How is it been done?
I guess you could use <s> or <strike> if you want the line through the text rather than wanting the line to break around the text. You could even use a combination of strike and NBSP but it's messy. Note that <strike> is deprecated in HTML 4 in favour of the CSS text-decoration: line-through style.
Eric's method is cleanest as it uses HTML 4 and CSS and no table for layout.
Jules
JiaPei Jen
Ranch Hand
Joined: Nov 19, 2000
Posts: 1309
posted
0
But, according to Eric's method, the line is not through the text. The line breaks around the text.
Julian Kennedy
Ranch Hand
Joined: Aug 02, 2004
Posts: 823
posted
0
If you want the line through the text then use <strike> with HTML 3.2 or style="text-decoration: line-through;" with HTML 4 or XHTML.
Jules
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: How To Write Some Text in a Horizontal Rule?