Ready to get started?Download WordPress


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

  1. Pete
    Posted 7 months 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 7 months 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. Pete
    Posted 7 months 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 7 months 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. Pete
    Posted 7 months ago #

    Bingo, thanks heaps!


You must log in to post.

About this Topic