Where is alignnone defined?

  • Author
  • #1035249


    In the visual editor, when you select alignment none for an image, WordPress inserts the alignnone class. I looked in style.css (Theme 2011) and all the other css files, but couldn’t find that class defined. Anyone know where it is?

    The blog I need help with is pwforaker.wordpress.com.


    I didn’t find anything in the wordpress.com support documents, but in the wordpress.org codex, I found this article:

    And I also found this interesting conversation from about 4 years ago.


    Moderator Emeritus

    What is it that you want to change about the alignnone option (for images?)? I think it is built into the themes so you cannot change it with CSS.


    Just tried it on test blog and was able to change margin for example. I would be leary to do so because it is the default setting for images and it might wreak havoc with trying to group images, etc.


    Moderator Emeritus

    Sorry, I don’t understand your answer.


    I was able to change the margin for the class alignnone using CSS. i set a wide margin just to see if I could style it.


    Moderator Emeritus

    You can do that simply with inline html code with a div tab (per incident).

    But the original poster was not asking about changing the margin of an image with alignnone, or am I missing something here?


    Moderator Emeritus

    The alignnone still remains as “align none.” Yes you can move it around, add borders, and backgrounds, but it still leaves the image as “alignnone.”


    Moderator Emeritus

    And my question remains:
    What do you want to change about the alignnone for an image?



    Thanks @houstonweaver, just what I was looking for. And, @1tess, it’s not that I wanted to change alignnone, but I wanted to copy it for use elsewhere.


    Tess, I thought it might be just a curiosity about the alignnone class being inserted in the image description, but the class not being explicitly defined in the style sheet. I know there are several ways to accomplish what I did. Nevertheless, the OP is happy.

The topic ‘Where is alignnone defined?’ is closed to new replies.