Results 1 to 7 of 7

Thread: (CSS) What is the proper way to handle Background Color?

  1. #1

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    (CSS) What is the proper way to handle Background Color?

    What is the proper way to handle Background Color? I am using
    Code:
    background-color:#ffffff;
    but I found out last night it dosen't work in IE6. I need it to work in IE5+ and NS6+
    Thanks in advance,
    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  2. #2
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    that should work in IE 6. Check your css for missing ; and syntax errors.

    Also, background: #FFFFFF; is the short-hand version of background-color: #FFFFFF;

    -Matt
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  3. #3

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    I figured out (just now) that it isnt my background but my height & width. I have them set to 100% but it is only hugging what is contained.
    These are span's inside td's and I need them to fill the whole cell. My code works in IE5.5 but not IE6.0... (I have yet to test for NS6+ and am not looking forward to that)
    Thanks
    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  4. #4
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    yeah, I have seen height 100% not work with IE 6 too. Not sure why.

    One thing you may want to try is setting the <td> width and height to 100% and then placing the class name inside the <td> like so:

    <td class="className" width="100%" height="100%">
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  5. #5

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    hmmm... that wont work because I have the td's set to 20x20px (this is a calendar and some days need to be different colors) I guess what I could do is set the background-color of the td's themselves. But there are some items w/in the days that I 'hilight' by stretching the span to the width of the td and coloring the background to yellow. I guess since I do know the width of the td I can set the span to the same correct?
    Thanks
    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  6. #6
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    yeah, i think that would work.
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  7. #7
    New Member
    Join Date
    Aug 2002
    Location
    lebanon
    Posts
    13

    Smile

    you can write this code:

    ___________________________________
    <body bgcolor="#FFFFFF">
    ___________________________________

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width