WordPress.org

Ready to get started?Download WordPress

Forums

CSS: wp-calendar caption tag in Webkit and Mozilla (and Opera/Presto) (6 posts)

  1. napaxton
    Member
    Posted 4 years ago #

    I am making some small maintenance changes to my CSS and PHP templates, to improve some of the formatting, and I've noticed the following oddity. Any help on how to fix it would be great.

    I've got the following in my CSS:

    #wp-calendar caption {
    	font: bold 1.3em Verdana, Arial, Sans-Serif;
    	text-align: center;
    	color:#6A5ACD;
    	}

    When this renders in Safari/Chrome or Opera, the month caption on top of the calendar centers nicely above the calendar in the center. However, on Firefox/Camino, it aligns to the right.

    What causes this? And how can I get FF and other Mozilla browsers to render it properly?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Try:

    #wp-calendar caption {
    font: bold 1.3em Verdana, Arial, Sans-Serif;
    text-align: center;
    color:#6A5ACD;
    display:inline-block;
    }
  3. napaxton
    Member
    Posted 4 years ago #

    Hmm. That did alter it, but then the Month Year caption ended up being put on the line after the days of the week. Any other ideas?

    Thanks.

  4. napaxton
    Member
    Posted 4 years ago #

    You can see an example of what I'm talking about at
    http://blogs.law.harvard.edu/natep

  5. esmi
    Forum Moderator
    Posted 4 years ago #

    wp-calendar caption {
    text-align:center;
    width:100%;
    }

    Try getting rid of width:100%;.

  6. napaxton
    Member
    Posted 4 years ago #

    Ah ha! That did it.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic