Solved

modify h2

Posted on 2016-12-01
4
8 Views
Last Modified: 2016-12-01
I am having a difficult time trying to modify the h2 on "interior" pages of my site and not have it impact the home page.  

beta site
http://bb0.036.myftpupload.com/

http://bb0.036.myftpupload.com/models-for-sale/
I am trying to make the "Financing Your Purchase" h2 tag to be smaller but when I modify it, that also modifies the Home page's "Simply Sophisticated " which appears below animation.  

I use this for the Financing Your Purchase  

.main-holder h2 {
    text-transform: capitalize;
    font-family: muli;
}

Open in new window


and this for the home page
h2.title-box_primary, .banner-wrap p  { /*h2 below slider*/
font-weight: normal;
    line-height: 60px;
    font-size: 47px;
    color: #5f5f5f;
text-align:left;
  text-transform: capitalize;}

but when i modify one, it impacts both.  help!
0
Comment
Question by:nsitedesigns
  • 2
  • 2
4 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
Comment Utility
but when i modify one, it impacts both.  help!

Are you sure about this and it's not a caching issue?

When you see a selector like .class htmlelement, that CSS will apply to all elements found as a descendant of the class.  In this case, .main-holder is present very high up on the page, so all h2's can be affected by it and changing that entry should affect both pages.

But htmlelement.class should only affect elements of that class.  Since h2.title-box_primary only appears on the front page any change to that CSS should be limited to the front page.
0
 

Author Comment

by:nsitedesigns
Comment Utility
Yes, that is what I thought. That it shouldn't impact each other.  I even viewed on private window to avoid cache issue and it still is a problem.  I changed font to red (not the color i want but it helps to pinpoint problems) and yes, the red is on h2's on interior pages AND on home page's 1) animation 2) simply sophisticated 3) h2's in 4 boxes below animation!

.main-holder h2 {
    text-transform: capitalize;
    font-family: muli;
  color:#bd3100;
 
}

Open in new window

0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
Comment Utility
But see above where I said changing .main-holder h2 WILL affect all pages because .main-holder appears to be applied to all pages.

To affect just interior pages, you need to scope the CSS so it only affects elements on those pages.  This can be a little tricky to do because there doesn't seem to be a lot of uniqueness in the current CSS selectors.

Your best bet may be to add something like:

.page-template-page-fullwidth h2 {
    color:#bd3100;
}

to your CSS file.  That class appears in the body tag on the interior page but not on the home page.
0
 

Author Closing Comment

by:nsitedesigns
Comment Utility
thanks!  that worked!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now