Next add the following styles to the Biograph image document. Remember the styles go between style tags in the head.
.rightimage {
float:right;
margin-left:20px;
margin-bottom:5px;
}
p {
text-align:justify;
}
Next place the following attribute and value into the image tag. Remember to view the page in the browser.
class="rightimage"
For this part you will add a drop cap to the Biograph document. A drop cap is a very large letter at the beginning of an article. Type the following CSS code into the Biograph document. Don't view until you do the next part.
.dropcap{
float:left;
background:brown;
color:white;
font-family:arial;
font-size:3em;
margin: 0 .3em 0 0;
padding: 0.1em 0.2em 0.2em 0.2em;
border:2px solid green;
}
Replace the first letter 'T' of the text with the following HTML code
T
Now view in the browser.
Modify the drop cap CSS code to change the style. Play with the color, font, border etc .. Don't forget about
http://www.w3schools.com/ .
View Source and save the code into your local system. Make sure the file name is hw1com.html
You will add the styles using an external stylesheet. Create a text file and save it as twocolstyle.css
Add the following styles to the stylesheet, but first link the HTML file to the stylesheet. Add the following html code to the head section of the HTML document.
Now add the styles to twocolstyle.css
#header {
background:#CCC;
padding:15px;
}
#main {
background:aqua;
float:left;
width:60%;
padding-left:2%;
}
#main li {
line-height:1.4em;
}
#rightbar {
margin-right:5%;
margin-left:62%;
}
#rightbar h2 {
margin:0;
padding:0;
}
body {
font-family:verdana, sans-serif;
margin-right:5%;
margin-left:2%;
}
Add some of your own styles to make the document look visually appealing.