• pranavc

    (@pranavc)


    Hello All,
    I am a brand new wordpress user. I have recently run into a snag with my blog posts (well, I have only done one post so far). When I try doing a “left align” on images, it does not work. The text that is supposed to appear to the right of the image instead appears below the image. My only alternative is to force the text to appear to the immediate right of the image by using the “align=left” bit in the html tag for the image.

    The second problem is that all my text is centre-justified – and I have not set the text to appear that way. Once again I have to force it to be left-justified by using the appropriate <p> tag. I find this annoying that I have to explicitly force things to appear a certain way when that is what the purpose of the stylesheet/ theme is. I have attached snippets of my stylesheet that I think apply to the problems noted above.

    body {
    font-size: 62.5%; /* Resets 1em to 10px */
    font-family: ‘Lucida Grande’, Verdana, Arial, Sans-Serif;
    background: #d5d6d7 url(‘images/kubrickbgcolor.jpg’);
    color: #333;
    text-align: left;
    }

    img.alignright {
    padding: 4px;
    margin: 0 0 2px 7px;
    display: inline;
    }

    img.alignleft {
    padding: 4px;
    margin: 0 7px 2px 0;
    display: inline;
    }

    .alignright {
    float: right;
    }

    .alignleft {
    float: left;
    }

    Based on these snippets above, is there something that needs to be modified to correct the issues I am encountering?

    I was also wondering what I need to modify to get my post heading to be left-justified. Any help would be highly appreciated. My apologies if these are trivial questions or have been asked before. I am new to blogging and am an amateur when it comes to .css. Thanks in advance.

    Regards,

    Pranav

Viewing 3 replies - 1 through 3 (of 3 total)
  • claus_01

    (@claus_01)

    > ‘left-justified’ and ‘centre-justified’

    There is actually no such thing as ‘left-justified’; either the text is aligned ‘left’ (default value), or ‘justified’. There must be a ‘text-align:center’ somewhere in your styles, but it’s not included in the code sample above. You would have to locate this piece of code and replace the ‘center’ with ‘left’.

    Regarding the image, have you tried an ‘<img class=”alignleft” … />’? Inside your code sample, there are two classes for images defined: ‘img.alignleft’, and ‘img.alignright’.

    HTH,

    Claus

    P.S.: Please, do not use the UK spelling ‘centre’; AFAIK this won’t work–or does it?

    Michael

    (@alchymyth)

    the align styles are wrong, more to the point – the display:inline; is wrong:

    img.alignright {
    padding: 4px;
    margin: 0 0 2px 7px;
    float:right;
    }
    
    img.alignleft {
    padding: 4px;
    margin: 0 7px 2px 0;
    float: left;
    }

    see also in the style.css of the default theme.

    Thread Starter pranavc

    (@pranavc)

    Hey alchymyth…Thank you so much for your response. My sincere apologies for not having responded sooner. This is helpful. I can see how this would solve the image alignment issue. Any thoughts on the automatic center-justification of the text? Once again, thank you for taking the time to acknowledge my post with a helpful response.

    Regards,

    Pranav

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSS/Theme questions from a newbie’ is closed to new replies.