473,808 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to increase vertical spacing of items within a <TD>?


First, I'm glad to find a newsgroup that still uses a FAQ:
http://www.htmlhelp.com/faq

The challenge:

These checkboxes (inside a table data TD tag) came out too squeezed
together (vertically) so I tried to double-space them with the CSS
"line-height" parameter. That did not work (at least for the IE
browser), so I put an extra break (BR) tag inside the TD and it works
great, but now it's a little TOO spacey.

Any ideas?
<tr>
<td>Please specify:</td>
<td>
<!-- span "line-height:1.5em;" -->
<br /><input type="checkbox" name="ckwheelc" wheelchair access<br
/><br />
<input type="checkbox" name="cksmoking " smoking allowed<br /><br />
<input type="checkbox" name="ckwc" restroom available<br />
<input type="checkbox" name="cksteps" heated area<br /><br />
<small><i>If other, you can describe it below:</i></small>
<!-- /span -->
</td>
</tr>
....or would you purists not stack things in a <TDlike this?

-------------------------

Also, thanks for posting http://css.maxdesign.com.au/listamatic/ ! A
wealth of clean HTML/CSS solutions. Very cool.

I am concerned that some of you turn JavaScript off because I use it
to verify what the user typed into form fields (to make sure there
aren't too many characters, that the email address entered looks like
an e-mail address, etc.) The only other way I can think of to verify
is to send the form back to the server. I like the idea of doing it on
the client. What method do you all favor for verification of form
answers?

Jan 10 '07 #1
3 12229
wo************@ hotmail.com wrote [in part]:
First, I'm glad to find a newsgroup that still uses a FAQ:
http://www.htmlhelp.com/faq

The challenge:

These checkboxes (inside a table data TD tag) came out too squeezed
together (vertically) so I tried to double-space them with the CSS
"line-height" parameter. That did not work (at least for the IE
browser), so I put an extra break (BR) tag inside the TD and it works
great, but now it's a little TOO spacey.

Any ideas?
<tr>
<td>Please specify:</td>
<td>
<!-- span "line-height:1.5em;" -->
<br /><input type="checkbox" name="ckwheelc" wheelchair access<br
/><br />
<input type="checkbox" name="cksmoking " smoking allowed<br /><br />
<input type="checkbox" name="ckwc" restroom available<br />
<input type="checkbox" name="cksteps" heated area<br /><br />
<small><i>If other, you can describe it below:</i></small>
<!-- /span -->
</td>
</tr>
...or would you purists not stack things in a <TDlike this?
Instead of using <tableand <br>, use paragraphs. The checkboxes can
be in paragraphs with class ckbox:
p.ckbox { text-indent: 10em; margin-top: 0.5em }

Vary the indentation and margin until it looks the way you want it.

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
Jan 10 '07 #2
Gazing into my crystal ball I observed wo************@ hotmail.com writing
in news:11******** **************@ p59g2000hsd.goo glegroups.com:
I am concerned that some of you turn JavaScript off because I use it
to verify what the user typed into form fields (to make sure there
aren't too many characters, that the email address entered looks like
an e-mail address, etc.) The only other way I can think of to verify
is to send the form back to the server. I like the idea of doing it on
the client. What method do you all favor for verification of form
answers?

Nothing wrong with client side javascript - I think it's a nice thing to do
for the user. But, just make sure that everything is validated server side
as well.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jan 10 '07 #3
Scripsit wo************@ hotmail.com:
First, I'm glad to find a newsgroup that still uses a FAQ:
http://www.htmlhelp.com/faq
The group that would have been the right one for your primary question,
c.i.w.a.stylesh eets, has a FAQ, too. Actually, two.
These checkboxes (inside a table data TD tag) came out too squeezed
together (vertically) so I tried to double-space them with the CSS
"line-height" parameter. That did not work
You didn't post a URL. Going thru the trouble of constructing a test page
from you sketchy code snippet, I noticed that setting line-height works just
fine. You might, however, have a different impression if you only set
line-height to 1.5em, which is not that much larger than the typical
defaults (about 1.2em to 1.3em). But this _is_ a CSS issue, not HTML.
so I put an extra break (BR) tag inside the TD and it works
great, but now it's a little TOO spacey.
You're just creating trouble that way. How many times can you break a line?
(<brmeans "line break") Some browsers think that <br><brshould create an
empty line, but that's really debatable, to put it mildly. So your HTML
approach is wrong; use CSS for styling.
<input type="checkbox" name="ckwheelc" wheelchair access
ObHTML: For accessibility, you should use <labelmarkup, e.g.

<input type="checkbox" name="ckwheelc" id="ckwheelc">
<label for="ckwheelc"> wheelchair access</label>

(See "Accessibil ity issues of checkboxes and radio buttons",
http://www.cs.tut.fi/~jkorpela/forms/kbd.html )
I am concerned that some of you turn JavaScript off
I'm more worried about people who don't do that and might not even know how
to do that.
because I use it
to verify what the user typed into form fields (to make sure there
aren't too many characters, that the email address entered looks like
an e-mail address, etc.)
As a side note, most e-mail address verification checks reject well-formed
addresses and accept addresses that violate the e-mail address format
standard.
The only other way I can think of to verify
is to send the form back to the server.
You mean you haven't implemented such checks first? Then sit back and wait
for the first joker to submit a gigabyte of junk, using a slightly modified
copy of your page. If you're unlucky, it won't be a joker but a cracker who
submits it in a loop.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jan 10 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

32
2537
by: Werner Partner | last post by:
Hier is the problem: http://asterix/sonoptikon.de/artemis/index.php The <h1> and <h2> make their ellbows so broad that in the picture arise borders on top and bottom. The general question is: How can I force left frame and banner to be exactly as broad resp. as high as the picture?
14
21932
by: Zenobia | last post by:
Hello folks, Is it possible to position an item within a <td> element? For instance see below. The table has multiple rows, one for each database record. Each row has 3 hrefs associated with it (for edit, delete and update). I want to position these 3 href items in the same columns, which would be posible if the span could be positioned - for instance on the extreme right of the td in which it is contained.
3
3662
by: Radek | last post by:
How can I get the following to appear on just 1 line? <style type="text/css"> #center { text-align: center;} #left { text-align: left;} #right {text-align: right} </style> <table border=1 width=200> <tr>
5
116813
by: Derek Fountain | last post by:
I have a horizontal navigation bar, which is a single row table containing the right images. It "stretches" itself across the screen using a penultimate td like this: <td width="100%" background="images/nav_bar/nb_spacer.gif">&nbsp;</td> which works in all major browsers that I've tried, but doesn't validate. No background attribute to the td tag, apparently. What is the correct way to do this? A stylesheet entry with a
3
1709
by: RC | last post by:
I have a very sime html table like <html><head><title>My Table</title> <style> input { margin: 0; padding: 0; border-width: 0; text-indet: 0; text-align: left } </style></head><body> <table border="1" width="100%"> <caption>Table Title</caption> <tr>
5
2632
by: Michael | last post by:
Hi. I need dinamically calculate input text field based on parent static TD before showing content of input. Please, advice. Michael
1
5512
by: test9991014 | last post by:
Hi folks, I've got something like this: <table> <tr> <td>1</td> <td align=center> <input type=text> </td>
4
3830
by: ismailc | last post by:
Hi, I need help please. In <TD> certain length/max length then force <BR> I would like within a <TD> to allow certain amount of char and then force a <br>. Is this possible, Please Assist! Regards
4
5294
by: harryusa | last post by:
I am trying to center 2 images concentrically which are z-indexed to lay on top of each other making an image with a border from another image that has a transparent center. I need the images to be horizonally and vertically centered within a <TD> </TD> area. No matter what I do the two image just present one above the other, albeit centered, NOT on top of each other. I originally did the entire page layout in TABLES until I found out I.E. 7...
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10631
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10374
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10114
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3011
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.