6 replies [Last post]
scubadiver007
scubadiver007's picture
Offline
Regular
Last seen: 8 years 17 weeks ago
Joined: 2009-05-28
Posts: 11
Points: 14

Hello,

My learning curve is getting ever steeper!

I had designed a website with a doctype and. Then I decided I wanted a drop down menu but the page background image disappeared but the doctype to make the menu work meant the whole page messed up.

Starting from scratch, I am using the following doctype declaration and the menu works.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

I can put the background image in the tag and it works but how would I put it into the CSS code which I currently have as following (but does not work):

body

{
background-image: url(C:\Documents and Settings\David\My Documents\WTC website\stripe.jpg);
}

Mod edit: code tags added to correct display of markup, please check the posting instructions above/below post box.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 5 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2050
Points: 2282

Well, first nobody can see

Well, first nobody can see your C: drive and second you don't use back slashes in a URL.

scubadiver007
scubadiver007's picture
Offline
Regular
Last seen: 8 years 17 weeks ago
Joined: 2009-05-28
Posts: 11
Points: 14

The location of the image

The location of the image isn't the issue.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 5 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2050
Points: 2282

scubadiver007 wrote:The

scubadiver007 wrote:

The location of the image isn't the issue.

Well, that's all I can comment on because that's all you've shown. I could guess that it has to do with the fact that you haven't cleared your floats but that's only a guess due to lack of meaningful information.

scubadiver007
scubadiver007's picture
Offline
Regular
Last seen: 8 years 17 weeks ago
Joined: 2009-05-28
Posts: 11
Points: 14

Apologies, I thought my post

Apologies, I thought my post was clear. Let me ask a far simpler question:

Does the 'background-image' css code work with only certain doctype declarations?

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 5 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2050
Points: 2282

scubadiver007 wrote: Does the

scubadiver007 wrote:

Does the 'background-image' css code work with only certain doctype declarations?

The doctype merely switches the browser into standards mode. If the doctype is complete then the problem is most likely elsewhere. Can you show a link or at least all your code?

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 6 years 36 weeks ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2637
Points: 1556

scubadiver007 wrote: Does the

scubadiver007 wrote:

Does the 'background-image' css code work with only certain doctype declarations?

No. Can you provide a link so we can better serve your needs?