[resolved] How to: css align linked image to the right (5 posts)

  1. perthmetro
    Posted 2 years ago #

    I’m using this plugin to add a page’s content to my sidebar…

    The page in question has an image that floats to the right and is linked. Unfortunately the image ONLY floats to the right if the image is unlinked. I don’t think it’s the plugin fault, It seems to be a css issue that I just can’t figure out?


    Thanks, Pete

  2. greendemiurge
    Posted 2 years ago #

    I noticed that the content in your asdasda area is linked and floating correctly, but in the Contact Us area it is not.

    The main difference I can see between the areas is that the functional widget has its content wrapped in a div with class="textwidget". I'm not sure how that div got there, but when I add it in through chrome the image floats right like it is supposed to.

  3. perthmetro
    Posted 2 years ago #

    The top area content comes from a widget that is supposed to put a nominated page content, the bottom area is me just simply copying and pasting the html from that page.

    It appears the widget is somehow not letting the css align the image to the right??

    If anyone knows some css to get it aligned to the right that would be awesome !

    Thanks heaps

  4. ecdoesit
    Posted 2 years ago #

    Look for this CSS and remove the display: inline-block; or change it to 'inline'.

    #widgets a {
    display: inline-block;
    margin: 0;
    padding: 0;
    text-decoration: none;

    The reason why the image in the second widget worked perfectly fine is because it has the following CSS to override the snippet above:

    #widgets .textwidget a {
    display: inline;
  5. perthmetro
    Posted 2 years ago #

    Bingo, thanks heaps!

Topic Closed

This topic has been closed to new replies.

About this Topic