On this website
http://inspectelement.com/html5portfolio/
, I saw that he is using a float:left; command on the html5 <header> -element, and the css class “section”, which is the area where the content is.
If I change it to float:right, or float:none, or I delete it altogether nothing changes.
Why is he using the float command anyway?
The header has a fixed position, and the section is centered through the container:
#headercontainer, #contentcontainer {
width: 960px; margin: 0 auto; position: relative;
}
Is this some sort of technique, I´m not familiar with? Or can I just delete the float command?
Thanks in advance.
He probably uses floats so the element get’s out of normal flow and he is not clearing them to keep the bottom margin+section height at a state of 1000px no matter how much content is in the floated section. However if
<section>content will get over 1000px his approach will break. But since it’s a portfolio site he will manage to keep it working.