Skip navigation

Finding Your CSS Styles in WordPress

Tips Apply to the Full Version of WordPress.

Since 1999, all web pages are to be styled with style sheets called Cascading Style Sheets or CSS. Basically, the HTML page holds the structure of the page with descriptive titles to each section called “selectors”. In an attached file, called style.css in WordPress, all of the presentation instructions or style properties are set for each selector or HTML tag.

Let’s say that you want to modify your header’s text. It’s centered and you want to change it to right justified. To find your CSS styles in WordPress, you need to do the following:

  • View your page in your web browser.
  • From the menu choose VIEW > PAGE SOURCE. It will pop up a page with the generated HTML version of your page.
  • Look through the code. It may seem overwhelming, but concentrate on finding your header section. Using the browser’s search functions, search for header.
  • When you find it, it should be inside of a “container” looking something like this:
    <div id="header"><h1 ><?php bloginfo('name'); ?></h1 ></div >
  • This information tells you that the title of your site is in two selectors: h1 and header.
  • In a Text Editor program, open the style.css style sheet file in your Themes subfolder (usually in wordpress/wp-content/themes/themename/. This is your CSS file that holds the presentation styles for your page’s structure.
  • Scroll or search through it and look for header. Inside of that will be the first set of formatting references that form the header’s styles.
  • If you do not see a reference to text-align:center, search for the next selector involved: h1
  • In the h1 section, look again for text-align:center.
  • If text-align is listed, change it to text-align:right to make the text be right justified.

If you cannot find references for the header or h1 styles in your style sheet, or if you change it there and it still looks centered, some WordPress Themes put this information in the head of the header.php template file. Look there for the styles.

This technique applies to any of the styles you want to change within your WordPress site. If you are new to CSS, we have some articles that may help you learn more, and you can find more information about WordPress and CSS on the WordPress Codex.


technorati tags: , , , , , , , , , ,
site search tags: , , , , , , , , , ,
© Republished with Permission

2 Comments

  1. Posted March 13, 2011 at 11:00 am | Permalink

    Lorelle,

    I have read your post and still can’t find out how to change the H1 tags in my blog posts.

    I have purchased a WordPress theme called “Greyzed”. What it does is it makes the name of my Blog the H1 tag. Then all of the headlines for my posts are H2 tags.

    Of course you realize what this does to me on the search engines… my real post headline is not listed and instead it recognizes my Blog name as the headline.

    I purchased the Custom CSS… but I can’t figure out how to change the headlines to H1 tags.

    Do you have any recommendations to help me??

    • Posted March 14, 2011 at 3:20 pm | Permalink

      I don’t understand. You cannot use purchased Themes on WordPress.com. If you are on WordPress.com, using the Custom CSS Extra, you change the CSS stylesheet styles for whatever heading you wish where they appear. Contact the theme author for details on customizing and adjusting their Theme. As for what it does on search engines, not much. Most blogs and sites, unfortunately, were designed so the blog name was h1 and the post title was h2. Whoever told you how you would be penalized by this needs to catch up to modern SEO techniques. I wouldn’t worry so much about it and expend your energy on original, keyword rich content.


26 Trackbacks/Pingbacks

  1. […] Finding Your CSS Styles in WordPress […]

  2. […] Finding Your CSS Styles in WordPress This entry was written by Lorelle VanFossen and posted on June 24, 2007 at 4:11 am and filed under Web Design. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL. « Do You Get to The Point or Ramble to the Point In Your Blog? […]

  3. […] Finding Your CSS Styles in WordPress […]

  4. […] For more information in searching for your styles in your WordPress blog, see CSS: Studying Your CSS Styles and Finding Your CSS Styles in WordPress. […]

  5. […] Finding Your CSS Styles in WordPress […]

  6. […] Finding Your CSS Styles in WordPress […]

  7. […] For more information in searching for your styles in your WordPress blog, see CSS: Studying Your CSS Styles and Finding Your CSS Styles in WordPress. […]

  8. […] For more information in searching for your styles in your WordPress blog, see CSS: Studying Your CSS Styles and Finding Your CSS Styles in WordPress. […]

  9. […] Finding Your CSS Styles in WordPress […]

  10. […] Finding Your CSS Styles in WordPress […]

  11. […] Finding Your CSS Styles in WordPress […]

  12. […] Finding Your CSS Styles in WordPress […]

  13. […] Finding Your CSS Styles in WordPress […]

  14. […] Finding Your CSS Styles in WordPress […]

  15. […] Finding Your CSS Styles in WordPress […]

  16. […] Finding Your CSS Styles in WordPress […]

  17. […] Finding Your CSS Styles in WordPress […]

  18. […] my article on Finding Your CSS Styles in WordPress, I offer a technique for helping to find problems with your WordPress Theme stylesheet. This […]

  19. […] Finding Your CSS Styles in WordPress […]

  20. […] Finding Your CSS Styles in WordPress […]

  21. […] Finding Your CSS Styles in WordPress […]

  22. […] Finding Your CSS Styles in WordPress […]

  23. […] Finding Your CSS Styles in WordPress […]

  24. […] Finding Your CSS Styles in WordPress […]

  25. […] For more information in searching for your styles in your WordPress blog, see CSS: Studying Your CSS Styles and Finding Your CSS Styles in WordPress. […]

  26. […] For more information in searching for your styles in your WordPress blog, see CSS: Studying Your CSS Styles and Finding Your CSS Styles in WordPress. […]

Post a Comment

Required fields are marked *
*
*