WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Changing H1 tags with CSS

[Resolved] Changing H1 tags with CSS

  • Hi all,

    I have applied a h1 tag to my website’s title. As the default h1 tag size was too big for my site, I added the following CSS to return it to it’s original size.

    /* =Global
    --------------------------------------------*/
    
    .page h1 {
    	color: f3f3f3;
    	font-family: arial, georgia, "times new roman", times, serif;
    	font-size: 55px;
    	font-weight: bold;
    	letter-spacing: -4px;
    	line-height: normal;
    	margin-bottom: -10px;
    	margin-top: 30px;
    	position: relative;
    	text-align: right;
    	text-transform: lowercase;
    	width: 100%;
    }

    It worked perfectly for my home page (which is set as a static page) but it doesn’t have any effect on the blog page or any of the individual posts pages. The title is still the far-too-big original h1 tag size.

    Does anyone have any idea what I could do?

    Thanks a lot.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Michael

    @alchymyth

    Forum Moderator

    .page – which likely refers to the css class which is output by body_class() – is possibly restricting the style to static pages only.

    remove it.

    I took away ‘page’ and tried the following:

    .wrapper h1 {
    	color: f3f3f3;
    	font-family: arial, georgia, "times new roman", times, serif;
    	font-size: 55px;
    	font-weight: bold;
    	letter-spacing: -4px;
    	line-height: normal;
    	margin-bottom: -10px;
    	margin-top: 30px;
    	position: relative;
    	text-align: right;
    	text-transform: lowercase;
    	width: 100%;
    }

    It works perfectly!

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Changing H1 tags with CSS’ is closed to new replies.