Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-08-12 09:45:14

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

different backgound image for each section header

hi,

what would be the easiest solution to achieve this?

tried this, but didn’t work: ;)

#header-big {
background: url(/images/<txp:if_section name=" ">6<txp:else /><txp:if_section name="prices">7<txp:else />5</txp:if_section></txp:if_section>.jpg) no-repeat center center;
background-size:cover;
}

Offline

#2 2014-08-12 12:50:41

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: different backgound image for each section header

Give the <body> of each page a class or a id, for example <body class="<txp:section />">, so you can use it in the CSS as selector.

Last edited by GugUser (2014-08-12 12:53:33)

Offline

#3 2014-08-13 10:24:06

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: different backgound image for each section header

i added class to #header-big itself <div id="header-big" class="<txp:section />">
thank you for a suggestion!

Last edited by Gallex (2014-08-13 10:32:52)

Offline

Board footer

Powered by FluxBB