changing alignment of titles.

  • Unknown's avatar

    I’d like my blog title “Twenty-Something in Toronto” to be centred and I want the post title to be aligned left. If I change the H1 it seems to change them both. Any ideas?

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there, first, I noticed you are using a capital “h” in your CSS header rules (H1, H2, etc.). It is best to make those lower case. Normally it doesn’t cause any issues, but some times…

    Ok, the h1-h6 headers are used in the site title, post title, widget titles and whereever you put them in posts/page/widget content. An h1 is typically used in a few places, and it may not work to have the all the same size (h1 site title should be larger than an h1 post title, for example). So the theme designer will use more specific IDs and classes to control the different sizes for all the h1, etc., elements.

    The h1 site title has a class of “site-title” so you would use a rule like this:

    .site-title {
    text-align: center;
    }

    The h1 post title has a class of .entry-title, so you would use a rule like this:

    .entry-title {
    text-align: left;
    }`

    The above work for your theme, but theme CSS is generally unique to each theme, so it may not work for another theme.

    If you haven’t yet worked with the web inspector in your browser, I suggest taking a look at How to Find Your Theme’s CSS, which has some brief screencasts to get you started using the web inspector to find the CSS for the elements in your theme. I find the web inspector an invaluable tool.

  • Unknown's avatar

    Thanks! That worked perfectly. Thanks for the tips, I’m very new to CSS.

  • Unknown's avatar
  • The topic ‘changing alignment of titles.’ is closed to new replies.