How to avoid a new line after an image while using styles

S

Stefan Mueller

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
 
M

Mark Parnell

Deciding to do something for the good of humanity, Stefan Mueller
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 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top