I'm sorry if this question has been answered somewhere else (I strongly think so), but I just couldn't find an answer.

So, here we go:
How do I make an invisible border around an embedded image, in order to have a space between the image and the text? TinyMCE includes the images with <img src="http://www.source.net/test.gif" />.

If I include border="10px", I get a border around the image (with the color of the text), but there is no space created. So what exactly do I have to do?

Sry to bother you with this beginner's question, but I hope someone helps me. Thx in advance!

Comments

zeitenflug’s picture

There are several possible answers, I'm not really sure what you're trying to do. You can have a look at the hspace and vspace attributes to the img-tag, however, these are deprecated. (Deprecated elements may become obsolete in the future, but browsers should continue to support deprecated elements for backward compatibility.) This is the traditional way.

If this is what you mean, you should have a look at the CSS specifications regarding margins and distance:

http://en.selfhtml.org/css/eigenschaften/randabstand.htm

Dan McDermott’s picture

When i add a picture to a story I usually want it in the top left with a 10 px border. This is how I do it:

(sorry this is so cryptic but drupal is interpreting my code instead of showing it)

align="left"
style[equals sign here][quote mark here]margin-right: 10px;[quote mark here]

That code is how I did the pic on http://frederickcountyreport.com/?q=node/25

The best way to figure this out is to find an example of exactly what you want on some other page and click "view source" and look at the code.
___

Warren County, Virginia News & Networking: http://warrencountyreport.com

dreamYu’s picture

thank you, the margin-settings was what I was looking for!

btw. you can wrap your code in the code-tags which you can find in the formatting guidelines.

Dan McDermott’s picture

and it works for php stuff but it wouldn't show the whole html line i told you about it.
___

Warren County, Virginia News & Networking: http://warrencountyreport.com