Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How can I increase the spacing between my fields?

Posted on 2013-12-24
5
Medium Priority
?
209 Views
Last Modified: 2013-12-27
This is a problem that shows up most obviously in IE. Safari and Firefox don't display it, but IE is an irritant.

The problem is that my fields have no space between them. I've attempted to adjust the padding and border-spacing of the table and the cell, but to no avail.

What am I missing?

The page in question is http://muscularchristianityonline.com/campus/student_profile.php.

My stylesheet is at http://www.muscularchristianityonline.com/campus/stylesheet.css and the html is what you see in the source code.

What do you think?
0
Comment
Question by:brucegust
  • 3
5 Comments
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 1600 total points
ID: 39738228
Before spending too much on this, I would suggest looking through the html validation errors.  http://validator.w3.org/

Things like missing alt tags are not going to change anything, but missing closing tags will.

But as a quick fix, you may try changing the css for the td from

td {
font-family: Verdana, Microsoft Sans Serif;
font-size: 12px;
color: #000000;
padding: 0;
}

Open in new window

to
td {
font-family: Verdana, Microsoft Sans Serif;
font-size: 12px;
color: #000000;
padding-bottom: 5px;
padding-top: 5px;
}

Open in new window

0
 
LVL 35

Assisted Solution

by:Dan Craciun
Dan Craciun earned 400 total points
ID: 39738233
Remove padding:0 from the td and you'll have spacing in IE.

td {
font-family: Verdana, Microsoft Sans Serif;
font-size: 12px;
color: #000000;
/* padding:0; */
}

HTH,
Dan
0
 

Author Closing Comment

by:brucegust
ID: 39742821
Scott! What am I doing when I'm missing "closing tags." I've seen that before and I took it to mean that I had things documented in an improper sequence. Is that it or is there more to it than that?
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39742985
I am just about to sign off and will have to take  a look. Sometimes it is another issue that causes that error.
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39743088
Viewing your source, let's start on line 36.

It looks like this
<table class="body">
<tr>
<td class="body">&nbsp;<BR>
	<table class="content">
	<tr>
	<td class="header">
		<table class="login">
		<tr>
		<td style="width:425px; height:23px; vertical-align:center;">
		<form action="student_validate_header.php" method="Post" style="display:inline; padding:0;"><input type="text" size="23" class="login" name="email" value="email">
		<input type="password" size="23" class="login" name="password" value="password">
		<input type="image" src="images/login.png" border="0" name="submit" style="vertical-align:middle;"></form></td>
		<td>
		<IMG SRC="images/spacer.gif" width="325" height="23">
		</td>
		<td background="images/spacer.gif" width="175" height="23" style="vertical-align:top;">
			<table style="padding:0px; border-spacing:0; border-collapse:collapse; background-color:#ffffff;"><form action="search.php" method="Post" style="display:inline; margin:0;">
			<tr>
			<td>
			<input type="text" name="search" size="23" value="" style='border:0px; height:18px'>
			</td>
			<td style="vertical-align:top;">
			<input type="image" src="images/search_icon.png" border="0" name="submit">
			</td>
			</tr>
			</table></form>
		</td>
		</tr>
		</table>

Open in new window


It is kind of hard to spot the error at first, but let's indent your code.   Now see if you can spot the error here.   Forget about "&nbsp;<BR>" for now, that is not so much an error as not needed or compensating for something else.  

Your hint is you need to close everything in the same order it was opened. I do think you have become confused with this table layout.  You would be much better off using your tables to display tabular data and instead use a grid system to manage your content.  Once you find the error here, go back to the validator and keep pasting your code in (or supply url).  I wouldn't be so worried about missing alt tag's html that is out of order or not closing a tag needs to be fixed.  Sometimes, fixing one error has s domino effect and fixes others as well.
<table class="body">
	<tr>
		<td class="body">&nbsp;<BR>
			<table class="content">
				<tr>
					<td class="header">
						<table class="login">
							<tr>
								<td style="width:425px; height:23px; vertical-align:center;">
									<form action="student_validate_header.php" method="Post" style="display:inline; padding:0;">
										<input type="text" size="23" class="login" name="email" value="email">
										<input type="password" size="23" class="login" name="password" value="password">
										<input type="image" src="images/login.png" border="0" name="submit" style="vertical-align:middle;">
									</form>
								</td>
								<td>
									<IMG SRC="images/spacer.gif" width="325" height="23">
								</td>
								<td background="images/spacer.gif" width="175" height="23" style="vertical-align:top;">
									<table style="padding:0px; border-spacing:0; border-collapse:collapse; background-color:#ffffff;">
									<form action="search.php" method="Post" style="display:inline; margin:0;">
										<tr>
											<td>
												<input type="text" name="search" size="23" value="" style='border:0px; height:18px'>
											</td>
											<td style="vertical-align:top;">
												<input type="image" src="images/search_icon.png" border="0" name="submit">
											</td>
										</tr>
									</table>
									</form><!-- Where should this be closed -->
								</td>
							</tr>
						</table>

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question