Modify a custom style by using page metadata
Learn how to modify the Page Builder styles to get the look you want by using page metadata.
Page Builder CSS style sheets should not be edited directly, since these changes might be lost during a fix pack upgrade. Instead, Page Builder CSS can be overridden in a new style sheet belonging to custom theme.
See Page builder CSS for more information about the Page Builder style sheets
- Create a style sheet
- Open theme styles in WebDAV by going to dav:fs-type1/themes/<customTheme>/css/
- Create a folder: dav:fs-type1/themes/<customTheme>/css/custom/
- Create a CSS file under the custom folder: dav:fs-type1/themes/<customTheme>/css/custom/custom.css
- Write the new styles
- Open a Portal page that has theme applied
- Use a tool like Firebug to select and inspect the style rules you want to change
- Type the style rules you want to change into the custom style sheet
- Apply the custom style sheet to pages
- Figure out the root page for the area on which you want to apply the custom style. To apply to the entire site, choose the Content Root.
- Add metadata with a key of colorPalette and a value of css/custom/custom.css to the root
- Use Firebug to inspect CSS
- Open the Firebug plug-in in a Firefox browser
- Click the element selection icon in the Firebug menu bar
- Click the area on the page you want to change
- Double check that the correct area is selected in the HTML tab on the left
- Look at the Style tab on the right to inspect all the CSS applied to the HTML element
- Edit the CSS in the Style tab until the HTML element looks how you want
- Copy the CSS you changed in the Style tab into the custom style sheet
Custom style exampleChange the banner from white text on a black background, to black text on a white background.
- Use firebug to select the banner.
- Look at the Style tab to see that the lotusBanner CSS class assigns a black background-color and a background-image:
.lotusBanner { background-color: #000000; background-image: -moz-linear-gradient(center top , #525252 0%, #000000 100%); }
- Change the style to white and add it to custom.css.
.lotusBanner { background-color: #FFFFFF; background-image: -moz-linear-gradient(center top , #EEEEEE 0%, #FFFFFF 100%); }
- Use firebug to select the logo.
.lotusui .lotusLogo, .lotusLoginLogo { background-image: url("../images/portalLogoWhiteText.png") !important; }
- Change to use a black logo and add it to custom.css.
.lotusui .lotusLogo, .lotusLoginLogo { background-image: url("images/portalLogoBlackText.png") !important; }
- Select a navigation link.
.lotusBanner ul.lotusInlinelist li a, .lotusBanner ul li span.lotusUser { color: #EEEEEE; }
- Change the link color to black and add it to custom.css.
.lotusBanner ul.lotusInlinelist li a, .lotusBanner ul li span.lotusUser { color: #000000; }
- Click the Style tab dropdown in Firebug and select :hover to show the styles that apply to the links when a mouse is hovering over them.
.lotusBanner ul.lotusLinks a, .lotusBanner ul.lotusLinks a:visited, .lotusBanner ul.lotuslinks a:active, .lotusBanner ul.lotusLinks a:hover { color: #EEEEEE; }
- Change the :hover link color to black and add it to custom.css.
.lotusBanner ul.lotusLinks a, .lotusBanner ul.lotusLinks a:visited, .lotusBanner ul.lotusLinks a:active, .lotusBanner ul.lotusLinks a:hover { color: #000000; }
- Select the Log Out link and look at the :hover style.
.lotusBanner ul.lotusUtility a, .lotusBanner ul.lotusUtility a:visited, .lotusBanner ul.lotusUtility a:active, .lotusBanner ul.lotusUtility a:hover { color: #EEEEEE; }
- Change the :hover link color to black and add it to custom.css.
.lotusBanner ul.lotusUtility a, .lotusBanner ul.lotusUtility a:visited, .lotusBanner ul.lotusUtility a:active, .lotusBanner ul.lotusUtility a:hover { color: #000000; }All together, custom.css looks like the following sample:
.lotusBanner { background-color: #FFFFFF; background-image: -moz-linear-gradient(center top , #eee 0%, #FFFFFF 100%); } .lotusui .lotusLogo, .lotusLoginLogo { background-image: url("../images/portalLogoBlackText.png") !important; } .lotusBanner ul.lotusInlinelist li a, .lotusBanner ul li span.lotusUser, .lotusBanner ul.lotusLinks a, .lotusBanner ul.lotusLinks a:visited, .lotusBanner ul.lotusLinks a:active, .lotusBanner ul.lotusLinks a:hover, .lotusBanner ul.lotusUtility a, .lotusBanner ul.lotusUtility a:visited, .lotusBanner ul.lotusUtility a:active, .lotusBanner ul.lotusUtility a:hover { color: #000000; }
Use the Change Style shelfYou can configure the Change Style shelf to have override style sheet show up as a choice. See Adding a custom style: wp7 and follow steps 4 and 5:
{'label':'Custom','id':'customc.css','url':'css/custom/custom.css', 'thumbnail':ibmCfg.themeConfig.themeRootURI+'/images/changeStyle/defaultThumb.gif', 'help':''}
Parent
Change page style
Page Builder CSSJanuary 4, 2012
2012/01/04 v7. Edition 2: Second edition includes corrections a... 2011/12/15 documentation refresh