Where is alignnone defined?

  • Author
    Posts
  • #1035249

    pwforaker
    Member

    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.

    #1035333

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

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

    #1035337

    1tess
    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.

    #1035340

    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.

    #1035353

    1tess
    Moderator Emeritus

    @houstonweaver
    Sorry, I don’t understand your answer.

    #1035355

    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.

    #1035356

    1tess
    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?

    #1035357

    1tess
    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.”

    #1035358

    1tess
    Moderator Emeritus

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

    #1035360

    pwforaker
    Member

    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.

    #1035361

    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.