PDA

View Full Version : setting border to "0" in script



geebee2008
09-20-2008, 04:47 AM
hi, i believe this question is pretty basic. i'm trying to set the border to "0" for these two images, could someone inform me where to add that piece of code? thanks much
greg



defaultbuttons: {enable: true, moveby: 1, leftnav: ['images/minus.jpg', -30, 17], rightnav: ['images/plus.jpg', 16, 17]},

jscheuer1
09-20-2008, 10:24 AM
The code you have there is known in javascript as a property definition, the syntax shows it to be a property of an otherwise unseen javascript object. The name of the property is defaultbuttons. The definition is itself another javascript object (enclosed with {}). Javascript objects and their properties are completely arbitrary constructions, they are only given meaning by how they are used by the rest of the code. As a result, there is nothing there in what you provided as a code snippet that clearly shows how to add a definition for the border of the images it mentions.

To tell you how to script a border for those images, we would need to see more of the code, perhaps the entire script and markup for the page. However, you could define a border for all images on the page using css style. In a stylesheet, put:


img {
border: none!important;
}

Now, an image by itself will have no border anyway. So these images are probably being given borders by virtue of the fact that they are linked images. If that's the case, you can use:


a img {
border: none!important;
}

To be more specific, I would need to see all of the code involved in defining these images. So, if you want more help with these specific images:

Please post a link to the page on your site that contains the problematic code so we can check it out.