6 replies [Last post]
scubadiver007
scubadiver007's picture
User offline. Last seen 29 weeks 5 days ago. Offline
newbie
Joined: 2009-05-28
Posts: 5
Points: 6

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
User offline. Last seen 1 hour 2 min ago. Offline
rank Leader
Leader
Timezone: GMT-4
Joined: 2009-10-09
Posts: 748
Points: 838

Well, first nobody can see

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

CSS HTML ASP.net C# Coffee

scubadiver007
scubadiver007's picture
User offline. Last seen 29 weeks 5 days ago. Offline
newbie
Joined: 2009-05-28
Posts: 5
Points: 6

The location of the image

The location of the image isn't the issue.

Verschwindende
Verschwindende's picture
User offline. Last seen 1 hour 2 min ago. Offline
rank Leader
Leader
Timezone: GMT-4
Joined: 2009-10-09
Posts: 748
Points: 838

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.

CSS HTML ASP.net C# Coffee

scubadiver007
scubadiver007's picture
User offline. Last seen 29 weeks 5 days ago. Offline
newbie
Joined: 2009-05-28
Posts: 5
Points: 6

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
User offline. Last seen 1 hour 2 min ago. Offline
rank Leader
Leader
Timezone: GMT-4
Joined: 2009-10-09
Posts: 748
Points: 838

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?

CSS HTML ASP.net C# Coffee

CupidsToejam
CupidsToejam's picture
User offline. Last seen 1 hour 16 min ago. Offline
rank Guru
Guru
Timezone: GMT-5
Joined: 2008-08-15
Posts: 2382
Points: 1268

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?


First basic few steps in building a webpage
1. Gather and collect content.
2. Organize the content into meaningful semantic valid HTML
3. Design the prototype
4. Style using CSS

http://www.pixelbehavior.com