Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS An 8-page website, 7 page with on back pround, 1 page with another. Problem!

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #38688
    squichey
    Member

    Hi everyone.
    Was wonering if anyone might be able to help.
    I’m very new to web design. I was trying to have create a special page within a website that has a different background from all of the other pages. I have added the repeating image to the styles.css page but didn’t realise it would affect all 8 pages. Working with the logic it is obvious now, but how do I get round this problem? I am sure there is a simple answer but my lack of knowledge means I don’t have a clue how to solve my problem.
    I was hoping if anyone could help?
    Unfortunately, I cant show you the problem and would appreciate if replying, you could use termenolgy I would be able to follow.
    Thanks in advance
    Steve

    #105018
    TheDoc
    Member

    Add a class to the on the page that you’d like to be different. Then in your CSS you can use that to specify that page. Example:

    HTML:

    CSS:

    .your-name #div-name {
    background: url('/your/different/image.jpg');
    }
    #105020
    squichey
    Member

    Thanks TheDoc
    This is where my stupidity shines through..
    I follow the for instance

    but on the styles.css it would be??
    .wedding then I don’t follow.. (no div, image is in the section.
    i’m such a chump!!

    #105021
    TheDoc
    Member

    What are you applying your background image to?

    #105022
    squichey
    Member

    Thanks for this…

    Applying it to the ‘body’ tag in the ‘global section’ is that wrong?

    #105024
    TheDoc
    Member

    Nope, that’s fine!

    In that case, you’ll just do this:

    .wedding {
    background: /*something differnet*/;
    }
    #105025
    squichey
    Member

    wow, that simple? thanks so much!!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.