Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Problems with CSS and Background Images
i’m using the txp:section to (try to) change the background image for a div in my presentation.
the background image displayed for #ribbon (/images/6.jpg) works with out a problem. when i look at the source for the pages, the body id tag is getting parsed correcty. However, when i look at the css with firebug, it doesn’t show the css definitions for the css defined for different sections… (phew, i don’t know if that makes sense)
here’s the code and corresponding CSS:
<body id="<txp:section />">
<div id="container">
<div id="navigation"></div>
<div id="ribbon"></div>
<div id="content"></div>
<div id="footer"></div>
</div>
</body>
#ribbon { width:800px; height:275px; background:#CCCC94 url(/images/6.jpg) top left no-repeat; }
#2about #ribbon { background:#CCCC94 url(/images/5.jpg) top left no-repeat; }
#3leadership #ribbon { background:#CCCC94 url(/images/7.jpg) top left no-repeat; }
#5partners #ribbon { background:#CCCC94 url(/images/8.jpg) top left no-repeat; }
#4success #ribbon { background:#CCCC94 url(/images/9.jpg) top left no-repeat; }
#6contact #ribbon { background:#CCCC94 url(/images/3.jpg) top left no-repeat; }
thanks so much for your help. unfortunately, the site isn’t live, and it’s hosted with joyent, which means you need to update your host file to check it out (if you want to, 8.17.86.55 tlpconsultants.com)
thanks!
Last edited by claywso (2008-01-04 04:16:46)
Offline
Re: Problems with CSS and Background Images
- Your ids cannot start with a number.
- If the CSS isn’t loading for specific sections, assuming your using TXP’s css, double check in Presentation>Sections that the section’s style is correct (another mouthful). EX: section “contact” uses “contact” style.
Offline
Re: Problems with CSS and Background Images
thanks for the quick response – that fixed the issue.
one more question – if i want to use txp:section_list, how can i sort them in a specific way? i see the options in textbook, but i’d like to do them in a manner that’s not alphabetical.
thanks again for your quick help.
Offline
Re: Problems with CSS and Background Images
claywso wrote:
thanks for the quick response – that fixed the issue.
one more question – if i want to use txp:section_list, how can i sort them in a specific way? i see the options in textbook, but i’d like to do them in a manner that’s not alphabetical.
thanks again for your quick help.
read the textbook again. the first attribute gives you this:
sections=“section name(s)” Comma-separated list of section names to include in the list, displayed in specified order (unless overriden with sort attribute). Default is unset, leading to an unrestricted list of all sections.
Offline