Skip to main content
May 31, 2011
Question

More Image/stylesheet issues

  • May 31, 2011
  • 1 reply
  • 579 views

Hello again,

Just wondering if anyone could give me some quick style sheet issues, have an img class that looks a little something like this:

img {

border: 5px solid #adadad ! important ;

padding: 5px ! important ;

margin: 4px, 4px, 4px, 4px ! important ;

-moz-border-radius: 15px;

-webkit-border-radius: 15px;

border-radius: 15px;

}

Which works like magic for getting me a nice curved border in most modern browsers.

Now there are one or two small icon type images that I need to not have a border as they are actually within the text - can anyone think of a way of setting up RH9 so that I can have an image that doesn't follow these styles?

I am sure it will be to do with over riding these styles but not sure how to do this because it is not like I am selecting a style for the image files - they are just getting their styles from the img selector...

Anyone got any suggestions?

much 'preciated.

    This topic has been closed for replies.

    1 reply

    Willam van Weelden
    Inspiring
    May 31, 2011

    Hi,

    You can use a classname or create a different selector. The best way to go depends on the way your toipcs are set up.

    The easiest may be to create a new style:

    img.noborder {

         border: none !important;

    }

    In HTML, add the class "noborder" to the image:

    <img src="myimage.png" class="noborder" />

    The !important from the selector is overwriting inline styling, as RoboHelp automatically disables borders for images. If I remember correctly, this was done to save you the trouble of manually setting the border on a few hundred images. You can also create a class for images with borders, but you will need to add that class to all images which need a border.

    Greet,

    Willam

    May 31, 2011

    Ahh ok, this is helpful, so basically the answer is it has to be done in HTML? If this is so, then so be it, but it's slightly annoying as there is probably one or two "info" icons per topic.

    C'est la vie. Thanks for your help again, Willam.

    Willam van Weelden
    Inspiring
    May 31, 2011

    Hi,

    Unless you can create a unique selector for both images, I'm afraid it will be some HTML work. A selector may be an image in a paragraph with a specific class or an image in a list item.

    Greet,

    Willam