WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Font Size CSS Not Working (3 posts)

  1. FitzwilliamPenn
    Member
    Posted 4 years ago #

    Hi again. I have created a div that lets me move captioned pictures around. The picture lines up perfectly; all those properties work. However, I can't change the font size, alignment, color, or anything. If I put it in the HTML markup, it works, but if I try it in the CSS, it does nothing. I would prefer my CSS to do everything; it's easier, and it's just better style. Here's the relevant code:

    <style type="text/css">
    .picture { padding: 0.3em; font-size:0.8em; font-family:Arial, sans-serif; text-align:center}
    .picture img { vertical-align:middle; margin-bottom: 3px; }
    .right { margin-left:auto; margin-right:0; float:none; padding:3px}
    .left { margin-left:0; margin-right:auto; float:none; padding:3px}
    .center { margin-left:0.5em; margin-right:0.5em; float:none; padding:3px}
    </style>

    Any help would be a Godsend.

  2. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    remove these lines from the style.css:
    <style type="text/css">
    </style>

    these lines are only needed in the head section of a html file to hold style declarations, not in a .css file.

  3. FitzwilliamPenn
    Member
    Posted 4 years ago #

    Worked like a charm. Thanks, alchymyth!

Topic Closed

This topic has been closed to new replies.

About this Topic