Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-04 04:16:21

claywso
Member
From: Durham, NC USA
Registered: 2004-12-20
Posts: 57
Website

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

#2 2008-01-04 04:35:02

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

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

#3 2008-01-04 05:03:42

claywso
Member
From: Durham, NC USA
Registered: 2004-12-20
Posts: 57
Website

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

#4 2008-01-04 05:14:01

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

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

Board footer

Powered by FluxBB