Old 17-09-2007, 05:55   #1 (permalink)
Danyo
Graphic Designer
 
Danyo's Avatar
 
Join Date: Aug 2007
Location: Spain
Posts: 129
Send a message via MSN to Danyo
css float problem

When I float my image to the right of my paragraph the text is way to close to the image, how do I get the text to be abit further away? i.e Indent

Thanks
  Reply With Quote
Old 17-09-2007, 06:19   #2 (permalink)
herkalees
Semantics, yay.
 
herkalees's Avatar
 
Join Date: Nov 2005
Location: Salem, Massachusetts
Posts: 1,104
HTML Code:
<p> <img src="path/to/image.jpg" alt="Huzzah!" style="float:right; margin:0 0 2em 2em;" /> When I float my image to the right of my paragraph the text is way to close to the image, how do I get the text to be abit further away? i.e Indent </p>
__________________
  Reply With Quote
Old 17-09-2007, 06:27   #3 (permalink)
Danyo
Graphic Designer
 
Danyo's Avatar
 
Join Date: Aug 2007
Location: Spain
Posts: 129
Send a message via MSN to Danyo
Thanks I'll give it a try in abit. Enough with the Huzzah already lol.
  Reply With Quote
Old 17-09-2007, 06:37   #4 (permalink)
herkalees
Semantics, yay.
 
herkalees's Avatar
 
Join Date: Nov 2005
Location: Salem, Massachusetts
Posts: 1,104
Quote:
Originally Posted by Danyo
Thanks I'll give it a try in abit. Enough with the Huzzah already lol.
...but it's really good at reminding you to use proper alt text
__________________
  Reply With Quote
Old 17-09-2007, 13:23   #5 (permalink)
stupid dog
Professional Beer Drinker
 
stupid dog's Avatar
 
Join Date: Jul 2007
Location: New River, Arizona
Posts: 90
or, just try a hspace in the image tag....
  Reply With Quote
Old 17-09-2007, 13:49   #6 (permalink)
pgo
i'm done, son
 
Join Date: Jan 2005
Posts: 12,262
Quote:
Originally Posted by stupid dog
or, just try a hspace in the image tag....
...or move out of the 90s and start using valid HTML.

Also, you are technically required to provide a width for your floated elements.
  Reply With Quote
Old 17-09-2007, 14:06   #7 (permalink)
herkalees
Semantics, yay.
 
herkalees's Avatar
 
Join Date: Nov 2005
Location: Salem, Massachusetts
Posts: 1,104
Quote:
Originally Posted by stupid dog
or, just try a hspace in the image tag....
Your jokes aren't very funny.

Quote:
Originally Posted by pgo
Also, you are technically required to provide a width for your floated elements.
Ah yes - if it wasn't so early in the morning, I might've remembered that tid-bit. Thanks for the correction.
__________________
  Reply With Quote
Old 17-09-2007, 20:05   #8 (permalink)
bazzle
Senior Member
 
bazzle's Avatar
 
Join Date: Aug 2007
Location: Derby uk
Posts: 475
Send a message via MSN to bazzle
Surely from what your describing you need to specify padding around the image in your css.

just add

Code:
img {padding:2px;}
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8