473,480 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Horizontal Line

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
6 13004
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6362
by: Bernd Kuegle | last post by:
Hi! How is it possible to reduce the space between a pargraph and a horizontal line (top and bottom). It doesn´t look so good if there is the default space. Thanks Bernd
1
3204
by: Peter Mount | last post by:
Hi When I zoom into my site (http://www.petermount.au.com) with Opera 7.54 the horizontal scrollbar doesn't show when the site image is bigger than my screen. Yet the horizontal scrollbar shows...
2
3298
by: Dan V. | last post by:
Why is there a large space before the background image (horizontal orange line under top NAV horizontal CSS list buttons) in Internet Expolorer 6 only? http://www.officeactivate.com/fish ...
2
3316
by: Steve Teeples | last post by:
I have created a context menu within a treeview with several items. I want to separate them with a horizontal bar but can't find a way to do this. I've only seen a vertical bar with a break...
1
6675
by: Marco Liedekerken | last post by:
Hi, I want a Horizontal scrollbar to appear in my Panel control when I add new controls to it (when the width is getting too big). The Vertical scrollbar is easy (adding overflow: auto to the...
2
4388
by: Tina | last post by:
Am I missing something or does the listbox web control not have a horizontal scroll capability? Thanks, T
4
2915
by: Sakharam Phapale | last post by:
Hi All, I have installed VS .NET 2002 on my machine. I have checked both Vertical scrollbar and Horizontal Scrollbar options, in Tools -> Options-> Text Editor-> General-> Vertical Scrollbar...
2
5224
by: Csaba Gabor | last post by:
I have a table that sizes to take up most of the page's width. The (mostly empty) rightmost cell of a particular row starts off as wide as it can, but it might be that it gets something that...
2
2403
by: pbd22 | last post by:
Hi. I am trying to make a horizontal list that counts (downward) and a horizontal list that illustrates the time. Both list should be formatted the same (except for the nomenclature). I seem to...
2
1766
by: laredotornado | last post by:
Hi, Maybe I should break down and use tables, but I wanted to query the experts first. Below, I would like the words "First name" and "Last Name" to appear on the same horizontal and I would...
0
7048
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7091
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6743
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6966
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.