Help with CSS space aroung images
Posted: 28 May 2008 04:23 PM   [ Ignore ]
Newbie
Rank
Total Posts:  9
Joined  2007-10-11

Hello and thanks in advance.

I hope this is the right place to post a message as follows:

I need to insert an image and I need the image to be align to the left and to have some space around it so that the text wraps around it nicely.

So this is what I have:

<img src="images/horse_small.jpg" width="228" height="217" [b]hspace="10" vspace="10"[/b] border="1" align="left" /> 

Now because the text around has the following attributes in the CSS file I do not get any vertical or horizontal space (hspace=“10” vspace=“10”) around the image:

 

.text_normal{
    font
-familyArialHelveticasans-serif;
    
font-size13px;
    
color#000000;
    
text-decorationnone;
    
text-alignleft;
    
padding:0px 10px 0px 18px;
    
text-align:left;


How do you suggest me to modify the CSS so that I have the space around the image and the text wraps around it nicely?

 

Hope this makes sense…

 


Thanks/Regards

Profile
 
 
Posted: 30 May 2008 01:46 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  9
Joined  2007-10-11

Anyone?

Profile
 
 
Posted: 03 June 2008 01:58 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  2
Joined  2008-06-03

Why don’t you give the img a class something like this:

for placing im to the left:

.imageleft {
         border
:1px solid #e5e5e5;
         
background-color:#ffffff;
         
padding:5px;
         
margin-left:10px;
         
margin-right:10px;
         
float:left;

for placing image to the right:

.imageright {
         border
:1px solid #e5e5e5;
         
background-color:#ffffff;
         
padding:5px;
         
margin-left:10px;
         
margin-right:10px;
         
float:right;
Profile
 
 
Posted: 03 June 2008 02:10 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  9
Joined  2007-10-11

FANTASTIC!


That is exactly what I needed. Thanks a lot!!!!!!!!

Profile
 
 
Posted: 04 June 2008 05:56 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  2
Joined  2008-06-03

No problem.. and of course if you want some space all around the image just replace the marign-left and right with marign:10px;

Profile