June 25th, 2012, 06:47 PM
Problems setting <td> margins
I have some directions that I would like to display in two columns on a login page. I have set up a table to display the instructions for students and employees side by side. As it displays on my browser, the text of the instructions are formatted as I specify in the "style" except for the "margin-left" and "margin-right" parameters. So, in my browser, the code below shows up with the text justified, but the text of one column is right up against the text of the other column, making it very difficult to read.
I have whittled it down to as little complexity, in it's own little isolated HTML file to try and isolate the problem, but now I am stumped. Admittedly, I have very little experience with web development, so I'm sure this is a really stupid error on my part. I actually had this working just the way I wanted it the first time I made it, but my profile got lost that same day, so I had no backup
Here's the code, and thanks in advance for any help!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
If you have never claimed your account or set up a password,
please click here to claim your account.
Please use your Student ID Number and the password chosen when your account was claimed to log into your account.
Please use your network ID (firstname.lastname) and your network password when
logging in to your account. Please note that if this is your first time
logging into the system, you will need to have already logged into a campus
Forgot Your Password?
Students may change their password by using the
Pleasant Password System (PPS)</a> system. If you are receiving an error on PPS
that new students must claim their account, please be aware that whether you
are a new or existing student, this means that you must claim your account.
Employees who need to reset their password will need to call Tech Support
at 866-555-1234. Please note: Tech Support cannot assist anyone except the
employee whose account needs to be reset.
June 25th, 2012, 07:52 PM
my guess is that you don't need margin-left/margin-right, but, instead, need to use padding-left/padding-right to separate the text sections.
June 26th, 2012, 03:55 AM
To add to what DonR said, the margin properties do not apply to table-cells. You either have to use padding on the cells or use border-spacing. IE7 does not support the border-spacing property though.
P.S. "text-align:justify" can make text heard to read. Use it with caution.