Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5

Thread: CSS background

  1. #1
    Member
    Join Date
    Dec 2005
    Location
    Canvey Island, Essex, UK
    Posts
    67
    Member #
    12033
    Heya just a quick question here, is it possible to set both a image and a colour to be a background using css because when I set a background image and colour at the same time, the image displays but when the image stops the colour of the page is white even though i set it differently.

    Thanks
    Matthew Stocker
    (X)HTML, CSS, PHP & JavaScript Developer

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    No it's not possible ...

    Sometimes you have to do tricks like slice an image between <div>s,
    or make a faux background, stuff like that.

    You would think it would work like you want if you used a .gif
    with a transparent color, but that does not work either.
    (I tried it myself just to see).


  4. #3
    Member
    Join Date
    Dec 2005
    Location
    Canvey Island, Essex, UK
    Posts
    67
    Member #
    12033
    Dang that makes things harder then. How do you do faux backgrounds? Looks like ill have to research a bit.

    Thanks for the help mlseim
    Matthew Stocker
    (X)HTML, CSS, PHP & JavaScript Developer

  5. #4
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    When using a background image it is always advisable to give a background color too.

    Why? So if the image does not load for whatever reason you can still have an effect on the background of your pages.

    It sounds like you might want to repeat your image so it covers all of your background.

  6. #5
    Member
    Join Date
    Dec 2005
    Location
    Canvey Island, Essex, UK
    Posts
    67
    Member #
    12033
    I found out what was my problem hehe, I had declared the background image and background colour in the CSS then done a naughty and put a bgcolor in my body tag.

    Thanks for the help guys!
    Matthew Stocker
    (X)HTML, CSS, PHP & JavaScript Developer


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:41 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com