Styling individual pages in TTG Pages with custom css using the page ID

TTG Pages creates six pages that serve as the basis of your web site. It creates Home, Galleries, Services, About, Info, and Contact pages.
If you know anything about html, you probably know that the visible part of the page is contained within the <body> tag; the page your viewers see starts with the opening <body> html tag and ends with the closing </body> tag.

Each page created by Pages is also assigned a CSS ID.

For example, the opening body tag for the Contact page looks like this:

<body id=”about” class=”clearfix”>

The ID for the About page is “about.”

Similarly, the ID for the Home page is “home”, the ID for the Services page is “services”, the ID for the Galleries page is “galleries”. You get the idea.

What this means is that you can style each of these pages individually with custom css. Say you want a different background color or background image for your About page. Or perhaps you want the H1 headings on your Contact page to be a different color or font. Or you want to “frame” the image on your Info page with a large amount of padding and a thick border.

All you need to do is to add the appropriate css to your custom.css file.

Some examples

To change the color of the H1 heading on the Contact page:

#contact h1 {
color: red;
}

To change the background color of the About page:

body#about {
background-color: #87CEFA;
}

To frame the image on that Info page:

#info img {
background-color: white;
padding: 30px;
border: 5px solid black;
}

Using the right selector, you can custom style any element on the page. You just need to figure out what selector to use. That’s where developer tools like the Inspector come in. You can read about using the Inspector here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About this site

This site is: a repository of time-savers and best practices from a user's perspective, picked up from several years of using TTG plugins.
This site is not: a support site.
Read more here.

Subscribe to new posts

Tip Jar

If this site has saved you some time, kept your hair attached, or otherwise prevented you from tossing the mouse through the monitor, feel free to donate.

Categories


Highly recommended. This is my go-to Lightroom book. Click on the book image. (affiliate link)

Affiliate link!

Current TTG versions

Backlight  4 & 5

See the Backlight Modules page on your site for latest Backlight and module versions and changelogs.

You’ll also find the latest version number and download link for the Lightroom Publisher plugin.
(BL 3 and later)

 

Backlight 1 Versions

Backlight 1.2.4
Pages module 1.2.4
Cart Add-on 4.1.7
Client Response Add-on 7.1.3
Theater Add-on 1.2.6
Galleria Add-on 1.0.0
WordPress Add-on 1.2.6
Publisher 3.2.3

Backlight 1 has seen its end of life. See this post.

CE4 Versions

note: CE4 is no longer being developed or sold. See this post.

TTG-BE: 2.0.5a
Autoindex: 7.0.8
Cart: 3.1.4a
CRG: 6.1.3a
Gallery: 6.1.10
Pages: 7.0.15
Publisher: 2.3.3
Stage: 6.1.6
Theme for WordPress: 3.1.2