Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   How to avoid a new line after an image while using styles (http://www.velocityreviews.com/forums/t164445-how-to-avoid-a-new-line-after-an-image-while-using-styles.html)

Stefan Mueller 03-09-2006 03:07 AM

How to avoid a new line after an image while using styles
 
If I use
<img src = "pic.gif"> Text
the word 'Text' is located on the right side of the image 'pic.gif'.

However, if I use
<img src = "pic.gif"><div class = "my_style"> Text</div>
the word 'Text' is not located on the right side of the image 'pic.gif'.
It's located on a new line.

I guess I need to use <div...></div> because I'd like to set a style (font,
size, weight, color, margins, ...) to the word 'Text'.

How can I set a style to the word 'Text' so that the word 'Text' is still
located on the right side of the image 'pic.gif'?
Stefan



Mark Parnell 03-09-2006 03:28 AM

Re: How to avoid a new line after an image while using styles
 
Deciding to do something for the good of humanity, Stefan Mueller
<seekware-remove-@yahoo.com> declared in alt.html:

> However, if I use
> <img src = "pic.gif"><div class = "my_style"> Text</div>
> the word 'Text' is not located on the right side of the image 'pic.gif'.
> It's located on a new line.


That's because <div> is a block-level element.

> How can I set a style to the word 'Text' so that the word 'Text' is still
> located on the right side of the image 'pic.gif'?


Replace div with span.

--
Mark Parnell

Now implementing http://blinkynet.net/comp/uip5.html

Stefan Mueller 03-09-2006 08:17 PM

Re: How to avoid a new line after an image while using styles
 
> Replace div with span.

Great, that works.

Many thanks
Stefan




All times are GMT. The time now is 07:57 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.