Exercise
In several of the steps, I ask you to changes to do something new that erases whatever you did in the previous step. Don't worry about it! Just go through all of the steps and submit whatever you end up with by linking to the page and (of course) uploading it.
- Start with a new html file. You choose the name.
- Create a div tag with an id set to central (<div id="central">).
- Use css to set the width and height of #central to 30rem, but the ACTUAL (as in pixel) width and height in pixels should be equal to 300px. For this to happen, you must set the root element (html {} ) to a pixel value. Your first challenge/job is to figure out the appropriate pixel value for the html element and to set it. This technique was explained in an earlier lesson.
This page is a good starting point for the remainder of this exercise.
- Add this background image to #central.
- Change your CSS so that the background image appears just one time, but in the very center of #central.
- Change the size of the background image with CSS so that it is twice as large in all dimensions (200%).
- Change the size again so that the background image completely fills #central. It will be pixelated but don't worry about that.
- Get rid of the background image and use linear-gradient to create a shocking background that you really can't stand. Take a look at it.
- Use border-radius to turn the #central div into a circle.
- Get rid of that linear gradient and create a radial gradient that you do like.
- Change the default property of the radial gradient so that it becomes circular as well, instead of elliptical.
- Still have time? Create a link, it doesn't matter what it links to. Use CSS to set things up so that a black, 15 pixel outline appears around the link when a user mouses over it.
- Optional Challenge: Finished that and still have time?!! Clearly you need a challenge. Figure out how to change the background properties of #central by clicking on a button (javascript of course). But only if you are looking for a challenge. This one is optional.