HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Image within paragraph
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
Heids



Joined: 26 Sep 2007
Posts: 2

PostPosted: Wed Sep 26, 2007 6:40 pm     Image within paragraph Reply with quote

Hey, im pretty new to html and can't work out whats goin on here..

Theres text which is left aligned and i need an image to be right aligned at the top of the table so that the text goes around it (just a square image) but with a clear border (which i have put in the css, see below). At the moment i have coded:

<table cellspacing="10" width="760" align="center">
<tr bordercolor="#FFFFFF">
<td colspan="2"><p class="dac_heading"><strong>MISSION STATEMENT</strong></p><br>
<p class="dac_body"><img class="images" align="right" src="images/mission.jpg"/>Investors in a project will benefit from...The combined experience of directors and staff will ensure that investors receive the best possible return.</p>
<br>
<p class="dac_heading"><strong>BACKGROUND</strong></p><br>
<p class="dac_body"><established in 1999 to allow clients to place funds into reliable, high return property investments.</p>

bla bla and the table ends. In IE the second paragraph doesn't start until the image has finished which i can understand as it is placed within the first paragraph. But in Mozilla the second paragraph keeps flowing around the image ie. what i want. Also, neither of them show the padding i want around the image which i have included in the css:

.dac_image {
border:#FFFFFF;
padding:5px, 5px, 5px, 5px
}

Can anyone help? Sorry if i explained it crap..
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8268
Location: Castle Rock CO USA

PostPosted: Thu Sep 27, 2007 12:09 pm     Reply with quote



The align attribute is deprecated. Use CSS instead
Code:
<img class="dac_image" src="images/mission.jpg" alt="alt text" />
and your style
Code:
.dac_image {
border:#ffffff;
padding:5px 5px 5px 5px;
float: right
}
Don't forget to use the alt attribute and make sure to add that extra space towards the end of your image element.

_________________
Corey
Toll Free Fax Numbers | Merchant Accounts | Microsoft Expressions
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial