Jump to content

Align Text And <div> On Same Line?


Recommended Posts

Hi, I am creating product pages for an e-commerce website. The product description uses html code. The product page I am working on is here:http://www.healthnutsradio.com/store/produ...=267&page=1Here is part of the code that I am asking about:

<div style="text-align: center;"><span style="font-family: Arial; font-weight: bold; font-size: 18pt; color: rgb(255, 0, 0);">Juicing is an excellent tool for putting concentrated nutrition into your body – and detoxification!</span><br />		</div><br /><div width="230" style="float: right;">		<table style="border: 1px solid rgb(0, 0, 0); margin-left: 10px; margin-bottom: 5px;">	<tbody>							<tr>				<td align="center" style="color: red; font-weight: bold; font-family: Arial; font-size: 14px;">Free Shipping in the US!</td>			</tr>			<tr>								<td>					<img border="0" alt="Omega Juicer 8003" src="http://www.healthnutsradio.com/main-images/omega8003.jpg" /></td>						</tr>			<tr>				<td bgcolor="#add8e6" align="center" style="color: rgb(0, 0, 0); font-weight: bold; font-family: Arial; font-size: 14px;">Omega 8003 Juicer<br />					<br />						<img border="0" alt="Buy Now!" src="http://www.healthnutsradio.com/main-images/order_now.gif" /></td>			</tr>				</tbody>		</table></div><p style="font-family: Arial; font-size: 18px; color: rgb(0, 0, 0); text-align: justify;">If you don’t own a JUICER, buy one, sell something to buy one if you have to - and use it daily!  Juicing is an excellent tool for putting concentrated nutrition into your body – and detoxification.  Every family needs one! Including kids!  Get kids drinking juice at an early age and they will thank you forever. <br />

So I have a table inside of a <div> tag, and I want the top of the top and the text that floats on the left ("If you don’t own a JUICER, buy one, sell something to buy one if you have.....") to be aligned on the same line. Right now when I view it, the table is about 5-10 pixels above the starting line of text. Any help will greatly be appreciated!

Link to post
Share on other sites

If I understand the request correctly, the floated Div needs to be first in the source code.Try placing the floated div with the table before the text div. Then the text will place itself beside the floated div.Lots of <br /> tags on that page. You need to understand the use of <p> tags with padding/margins better.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...