TCH-Thomas Posted January 27, 2004 Share Posted January 27, 2004 Following code makes a hr line as we know but is there a way to make it thinner? As it is now its twice the thick as i want. ><HR COLOR="#FFFFFF" WIDTH="75%"> -Thomas Quote Link to comment Share on other sites More sharing options...
borfast Posted January 27, 2004 Share Posted January 27, 2004 (edited) First of all, don't use caps for HTML tags, especially if you're coding XHTML, since it's invalid code. And remember to close your tags. In XHTML you *must* close all the tags. Those that didn't have a closing tag in HTML, like <img> and <hr>, should be written like <img /> and <hr />. And I also suggest that you use CSS instead of the old HTML attributes, since all "presentation attributes" of the hr element were deprecated in HTML 4.01. So... you can do it like this: ><hr style="color: #fff; width: 75%; height: 1px;" /> but even with 1px height it still shows like 2px, because it has the top and bottom lines. Try setting it to 10px to see what I mean. By the way, the #fff is equivalent to #ffffff. CSS allows you to pack the colors definitions. A better example would be this: #5b2 = #55bb22. At last, the solution I *don't* recommend: use the "size" attribute, like this: ><hr color="#FFFFFF" width="75%" size="1" /> but remember, this has been deprecated in HTML 4.01 and is not supported in XHTML - I tried using it on a page with the DOCTYPE set to XHTML 1.0, both Transitional and Strict, and the bar didn't show in any of them. Edited January 27, 2004 by TCH-Raul Quote Link to comment Share on other sites More sharing options...
TCH-Thomas Posted January 27, 2004 Author Share Posted January 27, 2004 Thanks Raul. Not sure though if CSS works in CSB but I give it a try. Also thanks for the extra info: By the way, the #fff is equivalent to #ffffff. CSS allows you to pack the colors definitions. A better example would be this: #5b2 = #55bb22. I always wondered why its only 3 letters in css fonts-color. Now I know. -Thomas Quote Link to comment Share on other sites More sharing options...
borfast Posted January 27, 2004 Share Posted January 27, 2004 No problem, I always like to help As for CSB working with CSS: I don't know since I never used it but it should allow you to edit the code manually, in which case you can do it easily Quote Link to comment Share on other sites More sharing options...
TCH-Thomas Posted January 27, 2004 Author Share Posted January 27, 2004 As for CSB working with CSS It works very well. At least this thing did. When inserting code directly in to csb (not using holders), we need to use to surround it, so it was mostly how it would react on that that i was worried of but it worked. -Thomas Quote Link to comment Share on other sites More sharing options...
SEO Posted January 27, 2004 Share Posted January 27, 2004 True about hr line... don't use it. I always recommend a graphic instead (i.e. a small gif file). Quote Link to comment Share on other sites More sharing options...
borfast Posted January 28, 2004 Share Posted January 28, 2004 Humm... why don't you recommend the use of <hr>, Scott? You got me curious about this one Quote Link to comment Share on other sites More sharing options...
DarqFlare Posted January 28, 2004 Share Posted January 28, 2004 I personally think HRs are ok to use assuming you can get them to display correctly on all platforms... I'm curious about Scott's slant on HRs though. Quote Link to comment Share on other sites More sharing options...
SEO Posted January 29, 2004 Share Posted January 29, 2004 No SEO motive here just a browser support issue (e.g. the color attribute). I think a simple .gif line (universal support ) with a defined 'look' is better visually. Quote Link to comment Share on other sites More sharing options...
DarqFlare Posted January 29, 2004 Share Posted January 29, 2004 Ah. I see. Different browsers. Quote Link to comment Share on other sites More sharing options...
TCH-Rob Posted January 29, 2004 Share Posted January 29, 2004 (edited) Ah. I see. Different browsers. And I see dead people. Stupid question, what's an hr line? That where you stand at the end of the week to get your paycheck? Edit: Duh, never mind. Horizontal line. Gee Rob, next time just open notepad and see for yourself. I am going back to packing now. :::::walking away in shame:::: Edited January 29, 2004 by TCH-Rob Quote Link to comment Share on other sites More sharing options...
borfast Posted January 29, 2004 Share Posted January 29, 2004 lol @ Rob Scott, I did think you had some SEO motives for not recommending the use of HR So what you're saying is that not every browser supports the same attributes for the HR tag? Even with CSS? Quote Link to comment Share on other sites More sharing options...
SEO Posted January 29, 2004 Share Posted January 29, 2004 The basic tag for a horizontal rule, <HR> is still valid in HTML, but all its attributes were deprecated in HTML 4.0 (marked for future deletion). You are correct Raul (no surprise ), you can use the background attribute in CSS and it will work in Explorer 5.x and 6.x, and Netscape 6.x browsers. Ex. HR { height:1px; width:50%; background:#000066; margin: 0px 150px 0px 150px; } I still prefer a simple gif file though Quote Link to comment Share on other sites More sharing options...
borfast Posted January 29, 2004 Share Posted January 29, 2004 OK, I was starting to find it weird. I didn't had the time to check it but I was almost sure that you could style an <hr> line with CSS. Unless it was something that only worked on some browsers. I wasn't sure and didn't check it, hence my question. I don't use <hr> much, anyway, so... who cares? Quote Link to comment Share on other sites More sharing options...
TCH-Thomas Posted January 30, 2004 Author Share Posted January 30, 2004 The "make the hr line as a picture" idea wasnt bad. The program I use to make websites in doesnt like colored lines, so this one made it look much better in every way. Thanks everyone involved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.