Jump to content

Archived

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

MWalsh

Custom CSS?

Recommended Posts

MWalsh

When I use the custom css area to change a section it changes that section site wide. Is there a way to localize it to just that page?

Share this post


Link to post
Share on other sites
MWalsh

I also tried using classy but it does not work. 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

All sections you add to your template, are given a unique ID which can be found by inspecting that section and looking for the section tag like so:

 

<section id=ssklafklsafhlksafas">...</section>

 

You can use that to prefix your code to only style that section. For example (remember this is an example and will most certainly not work on your site)

 

#slfkhaflkhsflkashf { background-color: #428BCA; color: white; }

 

You can also use the page-id-X class to style that section per page too.

 

.page-id-666 .section-masthead { background-color: #428BCA; color: white; }

 

You could also use the style classes field on the sections options, give it a unique class name for example add:

 

my-custom-background

 

Then save and goto the Custom Panel > Custom CSS/LESS and add the following:

 

.my-custom-background { background-color: #428BCA; color: white; }

 

This should give any section with that class name a custom background color and white text. You can found out more information on the style classes field here - http://docs.pagelines.com/tutorials/section-area-styling


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×