page specific css [Solved]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
laits
Forum Members
Forum Members
Posts: 50
Joined: Thu Sep 04, 2008 11:21 pm

page specific css [Solved]

Post by laits »

Hi all,

I'm working on a site, where essentially I only need one template, but would like my page background to be different for each page.

My original thought was to put my css into the page specific data area, hoping that this would work, i wrapped it in style tags, but cmsms didn't like it. It seems a bit of a work up to create different templates for changes in one css property.

I'm clearly overlooking something here, or am I?

as an idea the page specific css would be for instance:-


#wrap{
width:800px;
margin:auto;
height:450px;
background: url(../uploads/sundridge/home_bg.jpg);
}


I did think about putting the variable in a content block but, think that this would be a horrible hack, even if it did work.

Any ideas on this would be gratefully received

Rich
Last edited by laits on Wed Nov 11, 2009 11:48 pm, edited 1 time in total.
laits
Forum Members
Forum Members
Posts: 50
Joined: Thu Sep 04, 2008 11:21 pm

Re: page specific css

Post by laits »

Ok... worked it out from other posts, but for anyone searching this subject.

I used



css:
#wrap{
  width:800px;
  margin:auto;
  height:450px;
}

.home{
  background: url(../uploads/sundridge/home_bg.jpg)
}

.about{
  background: url(../uploads/sundridge/about_bg.jpg)
}

etc..
Somebody_1
Forum Members
Forum Members
Posts: 26
Joined: Tue Oct 20, 2009 10:52 am

Re: page specific css

Post by Somebody_1 »

Try



then in your styles sheet create styles to match your page alias.
Somebody_1
Forum Members
Forum Members
Posts: 26
Joined: Tue Oct 20, 2009 10:52 am

Re: page specific css [Solved]

Post by Somebody_1 »

Looks like you beat me to it!
Post Reply

Return to “Layout and Design (CSS & HTML)”