Opened 8 years ago

Closed 8 years ago

#27872 closed Bug (invalid)

Tutorial contains invalid instructions regarding background image

Reported by: Patrik Huber Owned by: nobody
Component: Documentation Version: 1.10
Severity: Normal Keywords: documentation, tutorial
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The tutorial06 (https://docs.djangoproject.com/en/1.10/intro/tutorial06/) gives some CSS to add a background image to the index.html poll page:

body {
    background: white url("images/background.gif") no-repeat right bottom;
}

However, this css is for the body tag, and the tutorial never defined any body tags for the index.html template. So the resulting rendered page doesn't have a body tag and the background image doesn't load. It looks like a mistake in the tutorial to me!

Change History (2)

comment:1 by Tim Graham, 8 years ago

As far as I know that has always worked -- browsers usually add an implicit <body> even if you don't include one. Which browser are you using?

comment:2 by Patrik Huber, 8 years ago

Resolution: invalid
Status: newclosed

Yes, you are indeed right. It was completely my bad. I created background.png instead of background.gif (who uses gifs except for animations anyway? :D), but I of course forgot to rename it in the .css.... So all is working as expected. Though it is slightly confusing defining a css for <body> but not having/setting any <body> tags - maybe you can decide whether it would be sensible to add a hint to the tutorial.

Thanks and sorry for the noise!

Note: See TracTickets for help on using tickets.
Back to Top