Jump to content

Archived

This topic is now archived and is closed to further replies.

Keith Vaugh

Masthead by 2 , need to have different colours

Recommended Posts

Keith Vaugh

Hi everyone

 

I have two canvas areas on one page and within each I have a masthead. I have successfully defined the masthead colour with the following CSS:

.masthead .masthead-title {
  color: #20687b;
}

However I need to change the colour in the second masthead but cannot figure out how to target it. (tried cloning the masthead and moving them, and also tried cloning the canvas areas)

 

Can someone provide a little guidance. 

Thanks

Keith

Share this post


Link to post
Share on other sites
casseysdesigns

Hi Keith, 

 

To target individual masterhead sections need to apply a class in the options for each section via in your DMS toolbar so that you can target them... 

 

Edit Section (pencil icon) --> Standard Options --> Custom Styling Classes

 

>> Just enter the name of your class in the input area; for instance "mast1" for the first and "mast2" for the second...

 

Once you have done that you can apply your colors to the class for each as follows...

 

.mast1 .masthead-title {
color:red;}
.mast2 .masthead-title {
color:#00abff;}

The css settings you listed ... will apply to all masterhead sections accross your site so you will need to remove those settings to obtain various colored headings...

.masthead .masthead-title {
  color: #20687b;
}

I hope this helps :)

 

Cre8ively,

Cassey

Share this post


Link to post
Share on other sites
Keith Vaugh

Thanks Casey

 

That really helps. Just transitioning to DMS and struggling to for solutions. Not only has your response helped me on this problem but with a few other's also. :D

 

Keith 

Share this post


Link to post
Share on other sites
Danny

Cassey is spot on and you can achieve the result you're looking for using that method. However, I would suggest being a bit more specific, so you can use these classes elsewhere, For example:

 

.text-white { color: white;}
.text-blue {...}
.text-green {...}
.text-red {...}
 
.bg-white { background-color: white;}
.bg-black {...}
.bg-blue {...}
.bg-red {...}
 
You can then mix and match then to create completely different styles options for example. In your first Masthead section, you could use the following class in the Custom Styling Classes field:
 
text-red
 
In the second Masthead section, you could mix and match them to give you a completely different style:
 
text-white bg-red
 
Which will give you white text and a red background.
 
The reason as to why this is a better method is because you can use these classes anywhere and you know what they do. For example:
 
<p class="lead text-red">Lorem ipsum dolor sit amet, <span class="text-green">consectetur</span> adipisicing elit.</p>

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Keith Vaugh

Thanks Danny. The makes perfect sense and would work perfect for my requirements.

Share this post


Link to post
Share on other sites
casseysdesigns

Hi Danny & Keith :)

 

Glad I could help Keith!

 

Danny, Thanks for the class naming tip :)

Share this post


Link to post
Share on other sites
Danny

No problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio+
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio+
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
    • nizami
      By nizami+
      Using navbar section with correctly configured WP menu to display main navigation at https://elenaangel.com. 
      All fine in desktop viewport. Menu displays twice in hamburger mode. How to fix this please? 

×