Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Aug 2005
    Posts
    252
    Thanks
    23
    Thanked 0 Times in 0 Posts

    override table bgcolor using css?

    I cannot edit the bgcolor. Further, I don't see how the info here will work.

    Can the bg color below be changed using css at the end of the document?

    <table width="982" bgcolor="#e5e0d4" border="0" cellpadding="4" cellspacing="0">

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You aren't reading the info correctly.
    Code:
    table {
    background-color:#F00 !important;
    }
    Though I don't know if IE 6 supports that but pretty IE7 and IE8 do. You could even do this
    Code:
    table[width="982"] { /* not supported in IE 6 */
    background-color:#F00 !important;
    }
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Posts
    252
    Thanks
    23
    Thanked 0 Times in 0 Posts
    Doesn't seem to work in ff3. Can I msg you to send the url? Would it matter is the css is after the bgcolor parameter?

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I guess you can send me the url but I don't understand, why can't you edit the html?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New Coder
    Join Date
    Sep 2007
    Posts
    41
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Errica View Post
    I cannot edit the bgcolor. Further, I don't see how the info here will work.

    Can the bg color below be changed using css at the end of the document?

    <table width="982" bgcolor="#e5e0d4" border="0" cellpadding="4" cellspacing="0">
    As far as I know;
    a. It is not possible to override any inline styling (especially HTML styling, and not CSS) using css that is not inline. inline style is at the highest priority.
    b. tables background color cannot be overriden if set. i.e. if you have bgcolor="something" than it is not possible to override it.

    You could however use javascript, but that seems overkill for a color change.

    Eli.


  •  

    Posting Permissions

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