Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
How to get text to align to right of image with pad?
Old 12-14-2007, 01:36 PM How to get text to align to right of image with pad?
Skilled Talker

Posts: 78
Trades: 0
Hello - I am building a hybrid here, using a table as a wrapper, and I wish to list multiple products going down. Problem is that my product text ends up under the product image - how can I get it to stay to the right of the image?

I would also love to hear any comments about anything that I am doing wrong laying this out, tag use, etc. (other than using tables! I know, I know.)

If you plug this into dreamweaver you will see.

Code:
<html>
<head>
<style type="text/css">

#productwrapper{width: 658px; height 140px; border-bottom: solid 1px #017eb1; }
#fontalign { padding: 10px 10px 10px 160px;}
.thebold {font-family: Arial, Helvetica, sans-serif;font-size: 18px; color: #017eb1; font-weight: bold;}
.thetext {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;}
.product { width: 100px; height: 75px; }

.homebold {font-family: Arial, Helvetica, sans-serif;font-size: 18px; color: #017eb1; font-weight: bold;}

</style>
</head>

<body>


<table width="658" border="0" cellpadding="0" cellspacing="0">
    <!--DWLayoutTable-->
    <tr>
      <td width="658" height="400" valign="top">
<div id="pad">
	  <span class="homebold">Our Products </span><br />
	  <span class="hometext"></span>		</div>		
		
		
		<div id="productwrapper">
		<img src="http://www.webmaster-talk.com/images/spacer" height="75" width="100" border="0"/>
		<div id="fontalign">
	  <span class="thebold">Product 1 </span><br />
	  <span class="thetext"> Nothing affects our lifestyle quite the way product 1 does. When you&rsquo;re entertaining, make your guests feel more welcome with our Indoor lights.<br />
        Learn More About product 1</span>		
		</div>
		</div>
		
		</td>
    </tr>
  </table>


</body>
</html>

Last edited by Boar; 12-14-2007 at 01:38 PM..
Boar is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-14-2007, 03:51 PM Re: How to get text to align to right of image with pad?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Simple solution - sort of - float the image.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 12-14-2007, 05:33 PM Re: How to get text to align to right of image with pad?
angele803's Avatar
Perfectly Imperfect

Posts: 1,774
Name: Stephanie
Location: Oklahoma
Trades: 2
EDIT....again

Okay, here is what I did and it seems to be working....

I removed the right padding of the fontalign div....I floated any image within the productwrapper to the left...and I told the productwrapper to clear any previously left floated elements.

Here is the code for the css:
Code:
#productwrapper{width: 658px; height 140px; border-bottom: solid 1px #017eb1; clear:left; }
#fontalign { padding: 10px;}
.thebold {font-family: Arial, Helvetica, sans-serif;font-size: 18px; color: #017eb1; font-weight: bold;}
.thetext {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;}
.product { width: 100px; height: 75px; }

.homebold {font-family: Arial, Helvetica, sans-serif;font-size: 18px; color: #017eb1; font-weight: bold;}

#productwrapper img {float:left;}
__________________

Please login or register to view this content. Registration is FREE

Last edited by angele803; 12-14-2007 at 05:58 PM..
angele803 is offline
Reply With Quote
View Public Profile
 
Old 12-14-2007, 06:05 PM Re: How to get text to align to right of image with pad?
Skilled Talker

Posts: 78
Trades: 0
wow, thanks angele803, that works great - hope I'm not boring you, I am new to css beyond text styling so I didnt even think to float anything!
Boar is offline
Reply With Quote
View Public Profile
 
Old 12-14-2007, 06:56 PM Re: How to get text to align to right of image with pad?
angele803's Avatar
Perfectly Imperfect

Posts: 1,774
Name: Stephanie
Location: Oklahoma
Trades: 2
No problem!

That is why we are all here...to help each other out!
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to get text to align to right of image with pad?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15447 seconds with 12 queries