WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Changing H1 tags with CSS (3 posts)

  1. wealthpossible
    Member
    Posted 2 years ago #

    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.

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

    .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.

  3. wealthpossible
    Member
    Posted 2 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic