Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 330255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:39:51+00:00 2026-05-12T09:39:51+00:00

i’m making a splash image div that changes the background with different css class,

  • 0

i’m making a splash image div that changes the background with different css class, here’s rules i defined:

#splash {
    height: 130px;
}

#splash.homepage { 
    background: #F7EECF url("images/splash_home.png") no-repeat 0 0 scroll; 
}
#splash.projectspage { 
    background: #F7EECF url("images/splash_projects.png") no-repeat 0 0 scroll; 
}

this works fine in firefox and chrome, but the background somehow doesn’t show up in ie 6. The weird thing is, it works for the homepage class but not the projectspage class. so ie 6 seems to interpret these almost identical rule differently. i tried clear the cache, didn’t help. i’m quite new to css and ie 6 hacks, so am i missing anythings here?

also another problem that’s slightly related to this, it seems it doesn’t work in firefox when there is space before the class, like “#splash .homepage”, but somehow i see other people’s websites using the css with a space. what could be the problem?

update:
i tried to reverse the order of the #splash.homepage and #splash.projectspage, then now projectspage works but not the homepage. It seems whatever is immediately followed by #splash is used.

here are some relevant css & htmls:

#splash {
    height: 130px;
}

#splash.projectspage { background: #F7EECF url('images/splash_projects.png') no-repeat 0 0 scroll; }
#splash.homepage { background: #F7EECF url('images/splash_home.png') no-repeat 0 0 scroll; }
#splashtext {
    padding: 53px;
    height: 40px;
    width: 450px;
}

#splashtext h2 {
    color: #FFFFFF;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: normal;
    font-style: italic;
}

#splashtext p {
    color: #FFFFAA;
    font-family: Calibri, Arial, san-serif;
    font-size: 14px;
    font-weight: normal;
    margin-top: 10px;
    font-style: italic;
}


<!-- splash, this one does not show -->
<div id="splash" class="homepage">
    <div id="splashtext">
        <h2>some header</h2>
        <p>some description</p>
    </div>
</div>

<!-- splash, this one shows -->
<div id="splash" class="projectspage">
    <div id="splashtext">
        <h2>some other header</h2>
        <p>some other description</p>
    </div>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:39:51+00:00Added an answer on May 12, 2026 at 9:39 am

    IE6 does not support multiple combined selectors to select elements (#id.class or .class.class, etc). IE6 will ONLY recognize the last class/ID in your chain.

    Details and example

    However, in this case, as long as you only have .homepage and .projectspage on one element on the page, the background image should be showing up on the correct element.

    I noticed that you are probably using .homepage and .projectspage to differentiate between two PAGES and the same ELEMENT on those different pages. A good practice is to put the class on the <body> element so you can use it to differentiate each page and their descendants.

    <body class="homepage">
        <div id="splash">
    

    Then your CSS would be:

    body.homepage div#splash { blah }
    
    body.projectspage div#splash { blah }
    

    Added benefit: you can now target any elements on a per page basis, not just the ones that you add “.homepage” or “.projectspage” to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 195k
  • Answers 195k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer WebLogic has no public API to take control of session… May 12, 2026 at 7:04 pm
  • Editorial Team
    Editorial Team added an answer FindFirst, FindNext & FindClose use API calls and they are… May 12, 2026 at 7:04 pm
  • Editorial Team
    Editorial Team added an answer To check when connected as the schema owner: select index_name… May 12, 2026 at 7:04 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.