Skip to content

Commit

Permalink
Clarified that tutorial background image should be self-provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz authored Mar 8, 2022
1 parent 58d357f commit 76fda77
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/intro/tutorial06.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,19 @@ Adding a background-image
=========================

Next, we'll create a subdirectory for images. Create an ``images`` subdirectory
in the ``polls/static/polls/`` directory. Inside this directory, put an image
called ``background.gif``. In other words, put your image in
``polls/static/polls/images/background.gif``.
in the ``polls/static/polls/`` directory. Inside this directory, add any image
file that you'd like to use as a background. For the purposes of this tutorial,
we're using a file named ``background.png``, which will have the full path
``polls/static/polls/images/background.png``.

Then, add to your stylesheet (``polls/static/polls/style.css``):
Then, add a reference to your image in your stylesheet
(``polls/static/polls/style.css``):

.. code-block:: css
:caption: polls/static/polls/style.css

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

Reload ``http://localhost:8000/polls/`` and you should see the background
Expand Down

0 comments on commit 76fda77

Please sign in to comment.