This is a discussion on "<HR> Styling" within the Web Page Design section. This forum, and the thread "<HR> Styling are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
<HR> Styling
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
<HR> Styling
Hi All,
I want to style my hr's in css, but i don't know how to go about it, help please! |
|
|
|
#2
|
|||
|
|||
|
Re: <HR> Styling
hr {
border: 0; width: 80%; } Thats the basic HR in css hope that helps. |
|
#3
|
|||
|
|||
|
Re: <HR> Styling
You can also thicken it with a border, or add colour. That's the beauty of CSS.
|
|
#4
|
|||
|
|||
|
Re: <HR> Styling
with the css style will it just work everytime i use the tag <hr> ?
|
|
#5
|
|||
|
|||
|
Re: <HR> Styling
|
|
#6
|
|||
|
|||
|
Re: <HR> Styling
It should do, unless you apply specific styling to it in isolation. Remember, the C of CSS means CASCADING, so the style cascades through your page(s) applying the same attributes, unless altered (say, with an in-line style specific to that entity).
|
|
#7
|
|||
|
|||
|
Re: <HR> Styling
Quote:
this applies to every hr element you use in your document. Same thing as if you were doing
|
|
#8
|
|||
|
|||
|
Re: <HR> Styling
the css style works perfect in IE7 but not in FireFox
CSS hr { border: 0; width: 100%; color: #fff000; height: 2px; } XHTML <hr /> |
|
#9
|
|||
|
|||
|
Re: <HR> Styling
See Mike's 2nd link for explanation on which browser supports which properties.
|
|
#10
|
|||
|
|||
|
Re: <HR> Styling
Thanks for the advise
|
|
#11
|
|||
|
|||
|
Re: <HR> Styling
This is the styling for a HR on one of my sites, and it renders perfectly in FF:
|
|
#12
|
|||
|
|||
|
Re: <HR> Styling
cheers, it was background-color for it to work in FF instead of color att.
Cheerz |
|
#13
|
|||
|
|||
|
Re: <HR> Styling
You shouldn't be using horizontal rules at all, in my opinion. You need to separate content/structure from presentation. Just use pure css for this.
Pete. |
|
#14
|
|||
|
|||
|
Re: <HR> Styling
Thanks for the advise Pete, but I am using the <hr /> as it is for around my Nav Menu
|
|
#15
|
|||
|
|||
|
Re: <HR> Styling
Why not give the ul a bottom or top border, depending on where you want it. I'm sure this would be very simple to achieve without any presentational mark-up.
Pete. |
|
#16
|
|||
|
|||
|
Re: <HR> Styling
I didnt thnk of tht, thanks Pete
|
|
#17
|
|||
|
|||
|
Re: <HR> Styling
Quote:
In fact, a case could easily be made that <hr> is "more semantic" than (say) using a CSS border in its place! Personally I never use this element, but I don't see its use as wrong. Convention generates meaning; more on this in a later article. |
|
#18
|
|||
|
|||
|
Re: <HR> Styling
I agree that it could be viewed that way but I believe in not using these things just because they have come to mean something and instead sticking to strict principles in some vain attempt at cleaning up the mess.
Pete. |
|
#19
|
|||
|
|||
|
Re: <HR> Styling
Quote:
Ever see * or * * * (or various other glyphs) used as a separator in a book? It's just a fancy <hr>. |
![]() |
| Tags |
| hr styling |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help with styling my blog please | alexgeek | Website Planning | 12 | Sep 23rd, 2007 01:25 |
| CSS border styling | RZX Developer | Web Page Design | 6 | Aug 10th, 2007 14:25 |