TavoxPeru 0 Report post Posted May 3, 2006 Hi, does anybody knows which is the equivalent tag in CSS of the HTML HR tag or how do i replace this. I need this because the HR tag is deprecated and i wanna validate a website.The code that i need to replace is this: <hr color='#663300' size='2'> best regards, Share this post Link to post Share on other sites
miCRoSCoPiC^eaRthLinG 0 Report post Posted May 3, 2006 That's quite easy in fact. You need to define a HR element in your CSS. Although note that there's some discrepancy in the CSS tags across different browsers. Somewhat like this: hr {height: 2px;color: #663300;width: 80%;} IE supports the color tag, while Mozilla and Opera support background-color. You can even use the tag background-image to replace the standard boring rule with some nice separator graphic. Here's a page outlining all you need to know about the HR tag: Styling HR Share this post Link to post Share on other sites
iGuest 3 Report post Posted May 3, 2006 HR has not been deprecated, but maybe the attributes for it has been. Unless this is XHTML 2.0, though I believe it still exists as well as new introductory tags like separator, etc.If you're using XHTML, then the hr tag is <hr />If you're using HTML then it's just <hr>Cheers,MC Share this post Link to post Share on other sites
iGuest 3 Report post Posted May 3, 2006 Is the page uploaded for us to see and what (exactly) is the warning or error message when you try to validate? Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted May 3, 2006 HR has not been deprecated, but maybe the attributes for it has been. Unless this is XHTML 2.0, though I believe it still exists as well as new introductory tags like separator, etc. If you're using XHTML, then the hr tag is <hr /> If you're using HTML then it's just <hr> Cheers, MC Sorry folks i confused what is deprecated, so you are right, the HR has not been deprecated, some of its attributes has been. regards, Is the page uploaded for us to see and what (exactly) is the warning or error message when you try to validate? This is the code: <hr color='#663300' size='2'> And generate the following warning: Warning: <hr> proprietary attribute "color" The tag contains an attribute that is proprietary to Netscape or Internet Explorer. The solution is this and works with IE and Firefox: <hr style="color:#663300; height:2px; BACKGROUND-COLOR:#663300;"> regards, Share this post Link to post Share on other sites
Hercco 0 Report post Posted May 4, 2006 I don't think color attribute for horizontal rule has never been in W3C recommendation. I could be wrong though.If you don't use HR for some specific trick, I'd recommend setting a consistent style for it using CSS. In normal pages HR should be used in a quite same matter and when you want to differ from it you can use special classes. Share this post Link to post Share on other sites