![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I need to make a 1px high divider, I'd prefer to use an hr. |
#3
| |||
| |||
|
|
Jeff wrote: I need to make a 1px high divider, I'd prefer to use an hr. Why? Just use the border property on one of the elements, i.e. h2 {border-top:1px solid} |
#4
| |||
| |||
|
|
Jeff wrote: I need to make a 1px high divider, I'd prefer to use an hr. Why? |
|
Just use the border property on one of the elements, i.e. h2 {border-top:1px solid} |
#5
| ||||
| ||||
|
|
Bergamot wrote: Jeff wrote: I need to make a 1px high divider, I'd prefer to use an hr. Why? I have no idea why Jeff wants that, but <hr> logically means "change of topic". |
|
Just use the border property on one of the elements, i.e. h2 {border-top:1px solid} What would you do in situation where a change of topic is to be indicated, e.g. before some remarks on a page at the very end? Using a heading for some short info like author name and date of update would look odd. |
|
Using <hr>, with optional styling, looks suitable. |
|
However, styling <hr> well is really tricky, as discussions over the year have shown. A simple, though not quote clean markup-wise, approach is to use div class="hr"><hr></div |
#6
| |||
| |||
|
|
Jukka K. Korpela wrote: Bergamot wrote: Jeff wrote: I need to make a 1px high divider, I'd prefer to use an hr. Why? I have no idea why Jeff wants that, but <hr> logically means "change of topic". He did not put it in context, which is one reason I asked: why? His divider doesn't necessarily mean a change of topic. |
|
Just use the border property on one of the elements, i.e. h2 {border-top:1px solid} What would you do in situation where a change of topic is to be indicated, e.g. before some remarks on a page at the very end? Using a heading for some short info like author name and date of update would look odd. Why would you need to add another heading? Put the border on a containing <p>, <div> or whatever. Using <hr>, with optional styling, looks suitable. The problem I have with hr is that once you start using it, you should use it *everywhere* there is any change in topic. If the OP uses one in the middle of his page, just to separate a couple form fields (as he mentioned in another post), if they are not enclosed within the same fieldset he should also add hr to other places in the page such as where the form begins and ends. Otherwise the page is sectioned off illogically. I see hr as outdated markup and mostly clutter. Yeah, it may look swell in Lynx but I think the hr is unnecessary. However, styling <hr> well is really tricky, as discussions over the year have shown. A simple, though not quote clean markup-wise, approach is to use div class="hr"><hr></div Reminiscent of Alan J. Falvell's decorative hr: http://www.alanflavell.org.uk/www/hrstyle.html |
#7
| |||
| |||
|
|
I thought it made sense to use an hr to separate the two sections of the form. Now I rarely rarely use hr's and this seemed like a good place for it, I appear to be wrong. |
#8
| |||
| |||
|
|
You could just use a nice gif and be done! |
|
Compensate for your crime by simply making sure that if the image failed to appear at all, the alt would appear as something like "form section separator". |
|
Further, you could make the form sections so clearly labelled that no one would be confused as long as perhaps the second section followed the first (as compared to it being upside down on an unrelated page somewhere else). |
#9
| |||
| |||
|
|
dorayme wrote: You could just use a nice gif and be done! If you want a decorative separator instead of <hr>, a background image with repeat-x is usually a better idea than a content image. Compensate for your crime by simply making sure that if the image failed to appear at all, the alt would appear as something like "form section separator". There are so many alt attributes that are bogus that I sometimes hope there would be a compulsory examination before you are allowed to write one. |
|
Would you really want to hear the words "form section separator" if you were filling out a form using a speech and keyboard based user agent? It's almost as foolish as having to listen to "separator icon" or "red bullet" between links or "decorative image" here and there. |
|
Using <hr> would at least give such user agents a chance to work well... |
#10
| |||
| |||
|
|
(Drove me crazy making a form without a table.) |
![]() |
| Thread Tools | |
| Display Modes | |
| |