Css Background problems

This is a discussion on "Css Background problems" within the Web Page Design section. This forum, and the thread "Css Background problems are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 12th, 2008, 12:30
New Member
Join Date: Mar 2008
Location: Australia
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Css Background problems

Is it possible to have a single CSS govern multiple pages that all have different backgrounds ??
I would like to not have to tag the background into the html if I can help it ...
Reply With Quote

  #2 (permalink)  
Old Mar 12th, 2008, 12:39
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,713
Blog Entries: 1
Thanks: 0
Thanked 16 Times in 16 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Css Background problems

body#pageID {}

for each page and in the HTML <body id="pageID"> this also makes it easier to control navigation based on per pages basis.

i.e. #nav ul li a {} and then you could do something like #pageID #nav ul li a {} will work on any child of the body. etc etc
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #3 (permalink)  
Old Mar 12th, 2008, 12:42
welshstew's Avatar
Lead Administrator

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,375
Blog Entries: 13
Thanks: 1
Thanked 14 Times in 12 Posts
Re: Css Background problems

yes, just set up different id's for your backgrounds then n your code ensure you pull through the appropriate id into the body tag

ie.
Code: Select all
body { background-color: #fff;}
body #bluebackgroundwithfunckystripes {background-image: url('bluebackgroundwithfunckystripes.gif')}
body #pinkpolkadotbackground {background-image: url('pinkpolkadotbackground.gif')}
page 1:
HTML: Select all
<html>
<head></head>
<body id="bluebackgroundwithfunckystripes">
</body>
</html>
page 2:
HTML: Select all
<html>
<head></head>
<body id="pinkpolkadotbackground">
</body>
</html>
something like that
__________________
WelshStew
Lead Administrator

tierney rides tboard - uk site | xtreme wales - extreme clothing
If you think I've helped, click the "Thanks"
webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
Reply With Quote
  #4 (permalink)  
Old Mar 13th, 2008, 07:34
New Member
Join Date: Mar 2008
Location: Australia
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Css Background problems

hmmm ... dont know what i'm doing wrong ... it's not working ....
sorta tried to follow welsh's instructions ....

will hav to play with it some more.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Background Oak Graphics and 3D 12 Mar 2nd, 2008 00:37
Problems with the background sbogde Web Page Design 4 Feb 6th, 2008 13:18
Background color problems with relative positioning kirkham85 Web Page Design 3 May 12th, 2007 22:53
Aligh and background problems with Opera and Firefox KiReSt Web Page Design 1 Jun 26th, 2006 20:08
Background and Resolution compatibility, My background gets cut off Funion Web Page Design 1 Dec 4th, 2005 04:42


All times are GMT. The time now is 06:06.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43