Explanation Lesson #3
Create a Website with HTLM5 and CSS
Font size should be defined in pixels. (*Much less confusing than ems for beginners)
The color property defines forecolor. It is defined here in hexidecimal code. We're changing from the default value because the text will be on a medium colored background.
The float property aligns an element to the left or right within its container.
You could also use text-align: left for left aligning the p tag.
header { /*Added Lesson #2*/ width:90%; float:left; padding: .5% 5%; background:linear-gradient(to bottom right , #99ccff, #ffffff); }
The padding property is defined in percentages or relative values.
It produces space between the edge of the element and the inner wall of the header element.
The settings are read: .5% top and bottom, 5% left and right.
The overall width of the header is reduced to 90% because of the 5% padding added on right and left sides.