Solved

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

Posted on 2008-10-07
2
1,152 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn how to count occurrences of each item in an array.

837 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