Jump to content

Background image

Recommended Posts

We have a web page that is using php and also html. We have a background image for the overall page, and then a secondary image for a section of the page. Using Goggle Chrome it displays fine, but in IE or in my Expression Web, it does not show the secondary image so you can't read the text. Any ideas?


The webpage is at http://www.amesastronomers.com/adamsobservatory.html





Share this post

Link to post
Share on other sites

How long have you been working on this?


Table layout is considered rather obsolete. Your table attributes are totally obsolete.


You cannot assign topmargin to body

You cannot assign marginheight to body

You cannot assign a height to a table in HTML.

You cannot assign a background to a table in HTML.

You cannot assign a background to a td in HTML.

You cannot assign a background to a tr in HTML.

Your DOCTYPE was non-standard. See http://www.w3.org/QA/2002/04/Web-Quality


Also all that HTML style and size stuff is obsolete. The modern approach is to put all of that along with the background image assignments into CSS.


I'm also having some other odd problem with the file encoding. You have it set up as...

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

...but it would probably be better and more standard to use UTF-8. It is the modern standard encoding. You can convert it with any decent editor such as Notepad++.

Edited by davej

Share this post

Link to post
Share on other sites

I went back and tried two really old doctypes on your code, but they still didn't validate those old tags...



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

...I would suggest that you simply take this as a sign that it might be time to update your skills. At a minimum you should upgrade to HTML 4.01 Transitional. You could be brave and upgrade to HTML 5. The only disadvantage of HTML 5 would be that an occasional user might have an old browser that would not render the site correctly.


You can easily patch up the existing code by simply using CSS to replace the now obsolete tags.


OR you could attempt a more radical modernization by beginning work on a div-based page design that would replace the table-based design. In a div-based design the page is divided up and encapsulated into divs and then the divs are styled to float appropriately. This is actually rather tricky until you get used to some of the caveats.


If you went to HTML 5 you could explore a variety of new and very interesting features that you might want to make use of...



Edited by davej

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...