SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru coiL's Avatar
    Join Date
    Sep 2001
    Location
    QLD, Australia
    Posts
    666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy background not showing in opera 6

    Hi,

    I have tried everything I can think of, but I cannot get a background image to show in a table cell in opera 6. (it works fine in ns 6 and ie6)

    The html:
    Code:
     <td colspan="2"> <!-- Bottom Edge Bar -->
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
    <td class="bottombar">&nbsp;</td> <!--the offending background-->
    <td width="245"><img src="images/bottom_tab.gif" alt="text here" width="245" height="29" /></td>
    </tr>
    </table>
    </td>
    the css:
    Code:
     td.bottombar {background-image: url(images/bottom_bar_bg.gif);
    vertical-align: top;}
    Can anyone see the problem with this? Anyone know how I can fix it?

    *edit - update*
    I solved the problem using width="100%" in the offending table cell. However, is this really correct? seeing as now the width of the 2 table cells is technically (100% + 245) ??

    Code:
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    	<tr>
    	 <td width="100%" class="topbar">&nbsp;</td>
    	 <td width="245"><img src="images/top_tab.gif" alt="Highpoint Business Centre" width="245" height="29" /></td>
    	</tr>
       </table>

    Any help will be greatly appreciated.
    Thanks [img]images/smilies/smile.gif[/img]
    Last edited by coiL; Jul 8, 2003 at 02:49.
    coiL
    "cradled in the learning curve"

  2. #2
    SitePoint Addict hurricane.uk's Avatar
    Join Date
    May 2003
    Location
    Liverpool
    Posts
    361
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by coiL
    the css:
    Code:
     td.bottombar {background-image: url(images/bottom_bar_bg.gif); vertical-align: top;}
    Can anyone see the problem with this? Anyone know how I can fix it?

    Vertical-align needs to be changed to background-position.
    http://www.w3.org/TR/REC-CSS2/colors...und-properties

  3. #3
    SitePoint Guru coiL's Avatar
    Join Date
    Sep 2001
    Location
    QLD, Australia
    Posts
    666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks but that didn't solve the problem. I use a background image with CSS in another part of the page and that works fine. There has to be something specifically wrong with the part I posted. I just can't see it though [img]images/smilies/frown.gif[/img]

    ps. If I add text to the table cell, the background stretches as far as the text does. [img]images/smilies/xeye.gif[/img]

    *edit*
    I solved the problem using width="100%" in the offending table cell. However, is this really correct? seeing as now the width of the 2 table cells is technically (100% + 245) ??

    Code:
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    	<tr>
    	 <td width="100%" class="topbar">&nbsp;</td>
    	 <td width="245"><img src="images/top_tab.gif" alt="Highpoint Business Centre" width="245" height="29" /></td>
    	</tr>
       </table>
    coiL
    "cradled in the learning curve"

  4. #4
    SitePoint Addict hurricane.uk's Avatar
    Join Date
    May 2003
    Location
    Liverpool
    Posts
    361
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have a link?


Bookmarks

Posting Permissions

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