Jump to content

Unexpected, unwanted centering in table cells in input form


jwcane
 Share

Recommended Posts

My form elements are all within table cells. Redundant 'align="left"' commands were added to tables, rows and cell tags, just to be sure of following:
I'm finding that with <input type="checkbox"...> and <input type="radio button"...>, some unknown setting in my style sheet is centering them, and adding a displacement between those elements and their adjacent text labels. Removing the style sheet reference, removes the error.
In other cells a <TextArea...> and an <input type= "select"...> are both correctly left-justified, so I'm at a loss to explain why this is happening only to the first two elements.
Possible css tags in current use, that might bear on this issue, include:
body{
/* font, color, etc... */
text-align:left;
}
form {
/* color, font-size, line-height */
text-align:left;
}
input,
textarea {
border:0px; padding: 2px; margin: 8px;
}
input {
width: 150px;
}
textarea {
width: 278px;
}
label {
display: block;
text-align: left
}
Any ideas appreciated.
Link to comment
Share on other sites

radio buttons are following

input {
width: 150px;
}
this affects the outside boundary container of the button and not the button itself, and it seems these button types by default, position themselves in centre, and text-align: left does not fix it, so i suggest you reset these elements width with
input[type=radio], input[type=checkbox]{width:auto;}
also validate your page, lot of mistakes being highlighted.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...