Link to home
Start Free TrialLog in
Avatar of jezella
jezellaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Image Padding

How do I add padding to an image so that it is on 2 sides only so that text is kept away from the right and botton sides of the image.

So maybe something like this:-

.p2 { padding:0em 3em 3em 0em}

Jezella
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Just put the image in a span using that class:

<span class="p2"><img src="yourimage.jpg"></span>

The span will size to the image plus the padding.

Cd&
Avatar of jezella

ASKER

This does not appear to work as I had hoped as I loose the test to the right.

This is an example http://www.ashley-wedding-cars.co.uk/examples/about-us.htm where I want to maintain the general layout but increase the space between the master image (the one with the question mark) and the text to the right of the image.

What CSS would I need to write to achieve this@

Many thanks

Jezella
ASKER CERTIFIED SOLUTION
Avatar of seanpowell
seanpowell
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jezella

ASKER

That's much better Sean, page lookes better and with more control. Thank you and also to Cd&

Jezella
My pleasure.
I posted a response to your other FP Q a while ago, don't know if I'm too late or not...
Sean
Avatar of jezella

ASKER

Sean in an external CSS, should the following work

.top-left-image
      {
      float:left; margin:0 3em 3em 0; border:none;
      }


That table sizing was a problem Sean.

Jezella
It should...