Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-10-07
2
Medium Priority
?
1,158 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
MMeijer earned 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

618 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