Forums

[resolved] Ignore stylesheet (13 posts)

  1. reuss
    Member
    Posted 5 years ago #

    I'm using a theme and a stylesheet that I'm quite happy with. But I would like to set in a picture that shoudn't have the border which the stylesheet, I surpose, put around the image. Is there a way I can work around that in the WP-editor? Is there a tag that causes the browser - momentarely - to ignore the stylesheet?

  2. doodlebee
    Member
    Posted 5 years ago #

    set a class for the image, and then set the class in the stylsheet with "{border:none;}"

    S'all there is to it :)

  3. reuss
    Member
    Posted 5 years ago #

    Thanks a lot doodlebee:)

    Regards

    Reuss

  4. reuss
    Member
    Posted 5 years ago #

    Sorry - I am an absolut beginner here:

    I've put:

    #imgraw {
    border: none;

    ...in the style.css

    And in the html (through the WP-editor I put:

    <div class="#imgraw"><p align="left"><img src="http://address.com/image.jpg" border="0" width="110" height="110" align="left" /></div>

    ...but I can't seem to get the syntax correctly - the frame (specified else where in style.css) is still there. Does anyone see what I do wrong?

  5. Les Bessant
    Moderator
    Posted 5 years ago #

    Try this:

    In the CSS, make that:

    .imgraw {
    border: none;
    }

    (If you use "#", you're making it an ID not a class)

    <img class="imgraw" src="http://address.com/image.jpg" border="0" width="110" height="110" align="left" />

    Don't put the "#" in the code.
    The "#" doesn't go in the tag

  6. reuss
    Member
    Posted 5 years ago #


  7. reuss
    Member
    Posted 5 years ago #

    Thanks a lot for the effort LesBessant. However right it looks to me I still can't get the darn thing to work out...:(

    I did excately what you told me - but still the properties of the '#content img', seems to have the last say.

  8. maerk
    Member
    Posted 5 years ago #

    Change your CSS to:

    .imgraw {
    border-width: 0;
    }

    I don't think you can have none for a border value, although I may be wrong.

    If that still doesn't work, try

    .imgraw {
    border-width: 0 !important;
    }

  9. Or you could just take the easy route:

    <img src="http://wordpress.org/style/header-logo.png" alt="" style="border: none;" />

  10. reuss
    Member
    Posted 5 years ago #

    Thanks a lot for all you inconvenience and effort. I solved the issue by simply adding
    style="border: none;" to the img tag (no changes to the style.css). That did the job:)

    Regards

    Reuss

  11. reuss
    Member
    Posted 5 years ago #

    ...excately as I now notice that Viper007Bond suggest:) Thanks a lot!

    Reuss

  12. StefanSuedfeld
    Member
    Posted 5 years ago #

    @reuss

    First you put the img in a container (div) with no border. But this has no effect on the img.
    You have to format the img directly.

    To late...

  13. moshu
    Member
    Posted 5 years ago #

    Then could you, please, mark this thread as resolved?

Topic Closed

This topic has been closed to new replies.

About this Topic