Css Walk Through
Css Walk Through
NOV. 2012
Open your html document in both TextEdit and in browser view mode. Create a CSS File: File>>New>>File>>SaveAs>>[Name your css document without spaces or characters and end it in .css]>>Make sure you save it in your website folder.
4. Set all your margins, etc. in your CSS file to default by writing this at the top of your CSS doc:
body, h1, h2, h3, h4, p, div, ul, li {margin: 0; padding: 0;}
1.
2.
10. Create a box in the center of the page and move it around
Now, let's take our bio content and put it in a div of its own. So, at the top of your bio content start the div with: <div id="biocontent"> and, after all of your bio content, end the div </div> In your CSS file, create the corresponding property for biocontent: #biocontent {} Let's put it in a white box that's 400px in height and 400px in width: #biocontent { background-color: white; height: 400px; width: 400px; } Let's also add some padding to the inside of the box so that our text isn't right again the side of the window: #biocontent { background-color: white; height: 400px; width: 400px; padding: 30px; }
3.
4.
5.
Finally, try swapping out a background picture for your box background. Ive provided one for you to test with. To add this photographic background, change your CSS to look like: #bigbox { width: 1024px; height: 768px; margin: 0 auto; background-color: #696969; background: url(images/Unicorn.jpg); }
;}
6.