I'm using asp.net with themes, master and child pages. In the base css, I've got the img tag with a border. It's great in that I never have to place a border around my images. However, on one page where I'm using the Nivo slider, I want to remove the border. I know it's the base image, cause if I change the border to white, the border is gone - but every image on my website is then missing the border. I thought the inheritance went theme, page, inline css? Any help?

     img { margin:0 10px 10px 10px;border:1px solid #000000;}
     #imgNoLine { margin:0 0 0 0;border:0 #ffffff !important; }

     #maincontainer #contentwrapper #contentcolumn #contentInnerTube fieldset .nivoSlider img { position:absolute;margin:0 0 0 0; top:0px;left:0px; display:none;border:none 0 solid white !important; }

     <img src="image.jpg" alt="" style="border-width: 0 !important;" id="imgNoLine" />
4 Years
Discussion Span
Last Post by janetb

I think the best solution is to add an css class to images without border.:

img.no-border { border: none; }

Then, add the class 'no-border' to the images that you want.


if you are having trouble try using jquery.

    $('.nivoSlider img').css('border','none');

@janetb... what you have implemented is common. As AleMonteiro mentioned, keep it as it, but create an additional style in your style sheet.

img.no-border { border: none; }

On the image element where you want to remove the border just apply that class directly.

<img src="#" class="no-border" />

The inline style will override the style you have in your external style sheet.


JorgeM & AleMonteiro - thanks. Tried it, but no luck. I'm with you, but this one is really frustrating. That's why I've kinda gone over the top... %-) Any other ideas?


Do you have this page online where we can take a look. Maybe you have something else involved here.

the suggestions that were given are correct and should work. I use this approach many times.


Gabrielcastillo, the jquery worked, SOMEWHAT. Thanks. The first image of the three-image rotation doesn't have lines, but the next two have lines. Any ideas? Still not sure why the css didn't work. I'm needing to start getting much more involved with jquery. Know of any good starter online tutorials? What would you recommend?

Edited by janetb

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.