Solved

How can i hide image border or make it ignore image padding?

Posted on 2008-10-07
2
1,150 Views
Last Modified: 2012-05-05
Hello,

I want to add a little padding around my images so that they are seperated from the text in my infowindows.

At present the only viewable image can be seen by clicking on the Norwich (SE England) pushpin marker, followed by the green arrow and then the round icon.

I have tried marking my image up as follows:
<img style="float: left; padding: 0px 10px 8px 0px";" src="/travel_pics/72/Toby Texas Chainsaw Massacre.jpg" width="100" height="100" alt="Highslide JS" title="Click to enlarge"/>

...but as you can see, this doesn't work because the Javascript uses a border which is defined at the top of my script.

How can i get round this, while still making use of the Javascript border (essentially the effect i'm looking for is what happens when you hover the mouse over the image!) ?


Many thanks
0
Comment
Question by:Daniish
2 Comments
 
LVL 5

Accepted Solution

by:
MMeijer earned 500 total points
ID: 22662335
padding is for inside container elements, too which <img /> does not qualify, but 'margin:0px 10px 8px 0px' will do.
0
 
LVL 6

Expert Comment

by:ixti
ID: 22662435
MMeijer is giving you a right point.

Also you may set it via CSS
so add somewhere inside <head></head> block:

<style type="text/css">
    .img_preview { margin:0px 10px 8px 0px }
</style>

another hook is to place image inside block element, such as:

<div><img ... /></div>

So you'll be able to do something like this:

<div style="border: solid 1px black; padding: 0px 10px 8px 0px"><img ... /></div>
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question