Scripsit shapper:
I have 20 inputs in a web page and I would like to add a 200px gray
horizontal line as a separator every 5 inputs to divide the form into
sections.
That would look odd if the font size is, say, 60px, which might be the
smallest font size that the user can read.
Did you intend to try to lock the font size? Well, you can't, but you can do
some harm trying to do it.
So make the width something more flexible, like 100% (why not?).
What is the best way to do this?
Does it make sense to do this? If the lines would not correspond to any
_logical_ grouping, it might be just a distraction.
Assuming it makes sense, using <hr width="100%"with
hr { color: gray; background: gray; }
is one option. The benefit is that the line appears even when CSS is off.
Do I need to place each group of 5 inputs inside a div and define the
div bottom border to 1px?
That might be a more feasible option, though it might be argued that it's
logically a <fieldsetrather than <div>, but <fiedsethas an obligatory
<legendand some idiosyncratic rendering features, so I reluctantly say
that <divis more practical.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/