By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,493 Members | 1,936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,493 IT Pros & Developers. It's quick & easy.

Horizontal Line

P: n/a
Hello,

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.

What is the best way to do this?

Do I need to place each group of 5 inputs inside a div and define the
div bottom border to 1px?

Thanks,
Miguel

Feb 22 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
shapper wrote on 22 feb 2007 in comp.infosystems.www.authoring.stylesheets:
Hello,

I have 20 inputs in a web page and I would like to add a 200px gray
200px wide?
horizontal line as a separator every 5 inputs to divide the form into
sections.

What is the best way to do this?
No, in programming and mark-up, there is no "best" way,
as programming is an art.
Do I need to place each group of 5 inputs inside a div and define the
div bottom border to 1px?
<style type='text/css'>
..hrGray {color:gray;width:200px;}
</style>

<hr class='hrGray'>
....
<hr class='hrGray'>
....
<hr class='hrGray'>
.......

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 22 '07 #2

P: n/a
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/

Feb 22 '07 #3

P: n/a
On 22 Feb, 13:00, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
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.
Why would it "look odd" ? It would be the same 200px grey rule that
the users with 12px text would see. Of course you'd now find fewer
characters alongside it, but that's in no way "odd".

Feb 22 '07 #4

P: n/a
Scripsit Andy Dingley:
On 22 Feb, 13:00, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
>>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.

Why would it "look odd" ? It would be the same 200px grey rule that
the users with 12px text would see.
That's why it would look odd.
Of course you'd now find fewer
characters alongside it, but that's in no way "odd".
The line would look riculously small. Try it and you'll see.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Feb 22 '07 #5

P: n/a
In article
<11**********************@l53g2000cwa.googlegroups .com>,
"Andy Dingley" <di*****@codesmiths.comwrote:
On 22 Feb, 13:00, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
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.

Why would it "look odd" ? It would be the same 200px grey rule that
the users with 12px text would see. Of course you'd now find fewer
characters alongside it, but that's in no way "odd".
Two giants, almost completely happily married, drive from their
house (a converted two story block of flats) in their sedan (a
converted furniture long distance removalist truck) to the
adoption agency. They are shown a nice little fellow. "Yes, he is
very cute... but it would look a bit odd... haven't you got any
giant kids for adoption please?" "But why?" says the counsellor,
"he is just a normal kid like most other kids, no one would bat
an eyelid seeing you all out together..."

--
dorayme
Feb 22 '07 #6

P: n/a
Jukka K. Korpela wrote...
>Assuming it makes sense, using <hr width="100%"with
hr { color: gray; background: gray; }
is one option.
Hello Jukka,

Out of interest, would the following also work?
<hrwith
hr {border: 1px solid gray; width: 100%; }

Apart from the width being included in the definition, is there any
difference in the way this would be implemented?
--
Martin Clark
Feb 25 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.