bg images not showing?

  • Allied77
  • Beginner
  • Beginner
  • Allied77
  • Posts: 40

Post 3+ Months Ago

Some of the bg images on my page aren't showing. They are there in Dreamweaver but not when I preview? any help?

Code: [ Select ]
<body>
<table width="813" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
    <td width="385"><img src="images/logo.jpg" width="385" height="167"></td>
    <td width="429" background="images/top_right.jpg">&nbsp;</td>
</tr>
<tr background="images/mid_bg.jpg">
    <td height="32" colspan="2"></td>
</tr>
<tr align="center" background="images/black_bg.jpg">
    <td height="39" colspan="2"><table width="814" height="39" border="0" cellpadding="0" cellspacing="0">
     <tr>
        <td scope="col">&nbsp;</td>
     </tr>
    </table></td>
</tr>
<tr>
    <td height="7" colspan="2" align="center" bgcolor="#FFFFFF"><div align="left"><img src="images/divider_bg.jpg" width="813" height="6"></div></td>
</tr>
<tr valign="top" background="images/main_bg_hor.gif">
    <td colspan="2" align="center" bgcolor="#FFFFFF"><table width="813" border="0" cellspacing="0" cellpadding="0">
     <tr>
        <td align="center" valign="top"><img src="images/left_space.gif" width="11" height="28"></td>
        <td align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top"><img src="images/right_spacer.gif" width="13" height="21"></td>
     </tr>
     <tr>
        <td colspan="4" align="center" valign="top"><div align="left"><img src="images/5px_space.gif" width="5" height="5"></div></td>
        </tr>
     <tr>
        <td align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top"><p>&nbsp;</p>
         </td>
        <td align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top">&nbsp;</td>
     </tr>
     <tr>
        <td width="11" align="center" valign="top"><div align="left"></div></td>
        <td width="595" align="center" valign="top"><p>&nbsp;</p>
         <p>&nbsp;</p>
         <p>&nbsp;</p>
         <p>&nbsp;</p>
         <p>&nbsp;</p>
         <p>&nbsp;</p></td>
        <td width="195" align="center" valign="top">&nbsp;</td>
        <td width="13" align="center" valign="top"><div align="right"></div></td>
     </tr>
    </table>     
    </td>
</tr>
<tr>
    <td colspan="2" align="center" bgcolor="#FFFFFF"><img src="images/bottom.jpg" width="813" height="40"></td>
</tr>
<tr>
    <td colspan="2" align="center" bgcolor="#FFFFFF">&nbsp;</td>
</tr>
</table>
</body>
  1. <body>
  2. <table width="813" border="0" align="center" cellpadding="0" cellspacing="0">
  3. <tr>
  4.     <td width="385"><img src="images/logo.jpg" width="385" height="167"></td>
  5.     <td width="429" background="images/top_right.jpg">&nbsp;</td>
  6. </tr>
  7. <tr background="images/mid_bg.jpg">
  8.     <td height="32" colspan="2"></td>
  9. </tr>
  10. <tr align="center" background="images/black_bg.jpg">
  11.     <td height="39" colspan="2"><table width="814" height="39" border="0" cellpadding="0" cellspacing="0">
  12.      <tr>
  13.         <td scope="col">&nbsp;</td>
  14.      </tr>
  15.     </table></td>
  16. </tr>
  17. <tr>
  18.     <td height="7" colspan="2" align="center" bgcolor="#FFFFFF"><div align="left"><img src="images/divider_bg.jpg" width="813" height="6"></div></td>
  19. </tr>
  20. <tr valign="top" background="images/main_bg_hor.gif">
  21.     <td colspan="2" align="center" bgcolor="#FFFFFF"><table width="813" border="0" cellspacing="0" cellpadding="0">
  22.      <tr>
  23.         <td align="center" valign="top"><img src="images/left_space.gif" width="11" height="28"></td>
  24.         <td align="center" valign="top">&nbsp;</td>
  25.         <td align="center" valign="top">&nbsp;</td>
  26.         <td align="center" valign="top"><img src="images/right_spacer.gif" width="13" height="21"></td>
  27.      </tr>
  28.      <tr>
  29.         <td colspan="4" align="center" valign="top"><div align="left"><img src="images/5px_space.gif" width="5" height="5"></div></td>
  30.         </tr>
  31.      <tr>
  32.         <td align="center" valign="top">&nbsp;</td>
  33.         <td align="center" valign="top"><p>&nbsp;</p>
  34.          </td>
  35.         <td align="center" valign="top">&nbsp;</td>
  36.         <td align="center" valign="top">&nbsp;</td>
  37.      </tr>
  38.      <tr>
  39.         <td width="11" align="center" valign="top"><div align="left"></div></td>
  40.         <td width="595" align="center" valign="top"><p>&nbsp;</p>
  41.          <p>&nbsp;</p>
  42.          <p>&nbsp;</p>
  43.          <p>&nbsp;</p>
  44.          <p>&nbsp;</p>
  45.          <p>&nbsp;</p></td>
  46.         <td width="195" align="center" valign="top">&nbsp;</td>
  47.         <td width="13" align="center" valign="top"><div align="right"></div></td>
  48.      </tr>
  49.     </table>     
  50.     </td>
  51. </tr>
  52. <tr>
  53.     <td colspan="2" align="center" bgcolor="#FFFFFF"><img src="images/bottom.jpg" width="813" height="40"></td>
  54. </tr>
  55. <tr>
  56.     <td colspan="2" align="center" bgcolor="#FFFFFF">&nbsp;</td>
  57. </tr>
  58. </table>
  59. </body>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Allied77
  • Beginner
  • Beginner
  • Allied77
  • Posts: 40

Post 3+ Months Ago

anyone?
  • webmattster
  • Beginner
  • Beginner
  • webmattster
  • Posts: 42

Post 3+ Months Ago

Is it just your background images, or all of your images including the ones you've just inserted into the page? The reason I ask is because I think sometimes when you preview, the image paths may be pointing to a different place than where they actually are so when you're in Dreamweaver they think they're in one place, but when you're previewing it, you may be viewing the page somewhere else.

If you're working on a live server, you may want to try using an absolute URL just to test it (i.e. - http://www.yoursite.com/images/image.jpg).

Hope this helps!
  • vaidhyasiv
  • Newbie
  • Newbie
  • User avatar
  • Posts: 8
  • Loc: India

Post 3+ Months Ago

Through the view source option, you can confirm whether the path(s) to the images are perfect.
  • Allied77
  • Beginner
  • Beginner
  • Allied77
  • Posts: 40

Post 3+ Months Ago

Hey. Thanks for relying

Hmm I have resaved and tried to put everything back in without success. I'm pretty certain the paths are correct. It's only some bg images that aren't showing. for example

Code: [ Select ]
<td width="385"><img src="images/logo.jpg" width="385" height="167"></td>
    <td width="429" background="images/top_right.jpg">&nbsp;</td>
  </tr>
  <tr background="images/mid_bg.jpg">
    <td height="32" colspan="2"></td>
  </tr>
  1. <td width="385"><img src="images/logo.jpg" width="385" height="167"></td>
  2.     <td width="429" background="images/top_right.jpg">&nbsp;</td>
  3.   </tr>
  4.   <tr background="images/mid_bg.jpg">
  5.     <td height="32" colspan="2"></td>
  6.   </tr>


This is some of the page. the first two images are there. The first image "logo" is a picture, the second one "top right" is a background image and the last one "mid_bg" doesn't appear but is there looking at the page in dreamweaver.

Can you have a bg image in a "tr"? It's the only difference I can see with the three of them?

I haven't tried a live preview, but will do that when I get back.

any help is appreciated!
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

I'd switch to CSS for this:
CSS
Code: [ Select ]
tr.mid_bg
{
background-image:url('images/mid_bg.jpg');
}
  1. tr.mid_bg
  2. {
  3. background-image:url('images/mid_bg.jpg');
  4. }

HTML
Code: [ Select ]
<td width="385"><img src="images/logo.jpg" width="385" height="167"></td>
<td width="429" background="images/top_right.jpg">&nbsp;</td>
</tr>
<tr class='mid_bg'>
<td height="32" colspan="2"></td>
</tr>
  1. <td width="385"><img src="images/logo.jpg" width="385" height="167"></td>
  2. <td width="429" background="images/top_right.jpg">&nbsp;</td>
  3. </tr>
  4. <tr class='mid_bg'>
  5. <td height="32" colspan="2"></td>
  6. </tr>
  • Allied77
  • Beginner
  • Beginner
  • Allied77
  • Posts: 40

Post 3+ Months Ago

Cheers mate,

will give this a go when I get home later.

Is there some reason that there is this problem with some images while not with others?

I made the page using tables (realise it's not ideal but..I'm not a webmaster by any stretch of the imagination ;), and just used css for the text and some borders.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

I'm not sure ... I'm typing here while I'm with a client, so I haven't had time to test this ... lol
  • Allied77
  • Beginner
  • Beginner
  • Allied77
  • Posts: 40

Post 3+ Months Ago

No probs mate. Thanks for the help! Hope it does the trick
  • trinimayl
  • Born
  • Born
  • trinimayl
  • Posts: 2

Post 3+ Months Ago

Are the original images saved with lowercase or uppercase extension? That is, is it logo.jpg or logo.JPG?
  • Allied77
  • Beginner
  • Beginner
  • Allied77
  • Posts: 40

Post 3+ Months Ago

Seems like I couldn't have a bg image in a <tr> tag. moved the html into the <td> tag and it worked out it seems
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

I was wondering if that was the issue but I know styles can be applied to tr's so I wasn't positive...
  • Allied77
  • Beginner
  • Beginner
  • Allied77
  • Posts: 40

Post 3+ Months Ago

EDIT: nevermind. Sopme werid reason the image deleted itself from the dir :hmm:
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8409
  • Loc: USA

Post 3+ Months Ago

:lol: Glad you got it worked out :thumbsup:
  • Allied77
  • Beginner
  • Beginner
  • Allied77
  • Posts: 40

Post 3+ Months Ago

Bogey wrote:
:lol: Glad you got it worked out :thumbsup:


You wouldn't believe how much time I wasted looking through the whole thing :lol:
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8409
  • Loc: USA

Post 3+ Months Ago

Haha I do the same thing after I realize an hour later that the problem is not with the code but with something entirely different...

You wasted about 2 days on this... correct?
  • Allied77
  • Beginner
  • Beginner
  • Allied77
  • Posts: 40

Post 3+ Months Ago

Bogey wrote:
Haha I do the same thing after I realize an hour later that the problem is not with the code but with something entirely different...

You wasted about 2 days on this... correct?


Tomorrow will be the fourth day :lol:

I tried doing this before I came here too. I don't know how someone does this for a living! Much respect! Sit there for hours wondering what a problem is only to realise you left out a / or something :lol:

Still nice satisfaction when it's coming together!
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8409
  • Loc: USA

Post 3+ Months Ago

:lol: Nah... I don't do this for a living but I can pretty much say I do as I sit almost 24/7 coding and everything either goes well on the first try or I have to post a question here on OZZU and than make the first reply saying I found a solution or other people posting solution here.

I always start about 2 or more projects at the same time... right now, I'm on 2 projects started by myself. My site and a membership system...
  • Allied77
  • Beginner
  • Beginner
  • Allied77
  • Posts: 40

Post 3+ Months Ago

I don't know how you do it! Long time web designer then? I'm tearing my hair out on one, wouldn't even dream of two at a time. Though it's fun (most of the time anyway!) so certainly want to make another site once this is finished. Though I think I'll take everyones advice and do it xhtml next time! I mean I still have to do the rest of the site :lol: so expect lots more posts from me around here
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8409
  • Loc: USA

Post 3+ Months Ago

I am expecting them :lol: Look at my post count... most of them are me asking questions

Post Information

  • Total Posts in this topic: 20 posts
  • Users browsing this forum: No registered users and 26 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.