PDA

View Full Version : When I have two elements next to each other how do i move one down a line?



gh05
Jan 17th, 2010, 08:16 PM
I want to move the newsletter down a line because the google ad has a space above it and therefore appears lower than the form on the right. Using <br/> doesn't seem to do anything. Any tips? Thanks.



<table align="center" colspan="1" border="1" bgcolor="blue" width="450px" style="color:#ffffff;">
<tr align="center"><td><a href="surveys.php" style="color:#ffffff;">Table A</a></td></tr>
</table>
</p><br/>
<p style="float:left;">
<script type="text/javascript">goole ad script
</script>
</p>

<p style="float:right;">
<table border="0"><tr><td>
<form method="POST" action="mailer.php">
</br>
<b>Newsletter</b><p>
If you would like to receive updates please enter your email address: </p> <input type="text" name="email" size="14">
<input type="submit" value="Sign Up" name="submit">
</form></td></tr></table>

Doctor_Varney
Jan 17th, 2010, 08:19 PM
<p style="float:right;margin-top:20px">


Tip: Since you're using styles, you don't need that table.

Excavator
Jan 17th, 2010, 08:33 PM
Hello gh05,
When I put a doctype and a correct page format around your code the validator finds 23 errors :eek:

For a float to work dependably accross different browser platforms it's going to need a width.

Doctor_Varney
Jan 17th, 2010, 08:49 PM
I wish I understood more about Doctypes!:o

Excavator, I've noticed how many problems you actually solve in here, just with that one line! :thumbsup:

Dr. V

Excavator
Jan 17th, 2010, 09:46 PM
Excavator, I've noticed how many problems you actually solve in here, just with that one line! :thumbsup:

Dr. V

DocTypes are your friend. QuirksMode is not... although it does have its uses.