Headway tips: Using Custom Classes in Leafs
I posted this in the Headway (affiliate link) forums first, but am putting it here too coz I really should start writing a few tutorials!
Ever noticed in leafs, under Miscellaneous, the Custom CSS Class(es) field?
And maybe wondered if you’d ever need it?
Well, tonight I discovered one two really good uses for it.
Let’s say you have a nice page layout but you want your homepage to be a bit different, but still have a couple of leafs in common.
For instance, on this site, I have three different layouts (front page, other pages, and post pages), but each has a common custom header for which I’ve had to duplicate the leafs and associated custom css.
Originally my CSS for the custom header I’d made looked like this:
body.custom div#leaf-29, body.custom div#leaf-47, div#leaf-69 {
position:absolute;
z-index:99;
top:110px;
background:transparent;
padding-left:60px;
left:0;}
However, by putting “myheader” in the custom classes field of each of those leafs, then I could rewrite the code as:
body.custom div.myheader {
position:absolute;
z-index:99;
top:110px;
background:transparent;
padding-left:60px;
left:0;
}
This is particularly handy if you screw up any of those pages (which I did twice to the front page!).
It means you can recreate the leaf, and although it will have a new leaf number, you won’t need to edit your css as long as you put the same custom class name in the custom class field of the new leaf.
Another way you might use custom css is if you want to style multiple leafs on a page or pages the same.
For example, say you’ve got three leafs you want a green background, then with custom classes in each leaf, you only need one class entry in your custom css.
Related posts:
-
http://www.catseyemarketing.com bob
-
STEVE
-
Chris
-
Francis
-
Chris
-
http://micah.illmakeit.com Micah Sewell
-
ND
-
http://www.breakoutselling.com Russ
-
Chris
-
Chris
-
http://dougdraws.com Doug C.
-
http://www.facebook.com/profile.php?id=793854814 Jason Correia
-
Chris
-
http://www.domain-hosting-services.in/ Domain hosting
-
http://www.imperiousseo.com SEO USA
-
http://www.mactonweb.com web development bangalore
-
http://removeripoffreports.net/ onlinereputation_management
-
http://www.mactonweb.com/web-design-company-united-kingdom.html web design london
-
http://removeripoffreports.net/ onlinereputation_management
-
http://www.marathonm2m.com/about-m2m/management-information-system.aspx management information system
-
Tony
-
http://www.facebook.com/louie.tugas Louie Tugas
-
http://www.mactonweb.com/ Web design London
-
http://www.adsyou.com/ ??? ????? ?? ??????
-
http://www.webhostings.in/ Web Hosting Provider

