To start off, let’s dissect some code and learn from there.
#content_main {border: 1px solid #990000;
float: left; }
This is the CSS for the content_main div defined in the HTML. Of course we covered the border already, but the two differeneces here are the float and the color. The hexidecimal color at the end of the first line of the border is a web-safe color. That’s a dark red if my memory serves me right. There’s tons of web-safe colors your code editor may already have a chart you can just use for whatever you like. In this instance though, the red changes the border and that’s it.
Then we have the float. Floats are somewhat strange and I’ll admit I don’t know EVERYTHING I would like to know about them but in a nutshell it basically just sends whatever your div is all the way to the left or right pending on how you define it. Then of course you could always stack stuff with it, but the main purpose for this is for column structures on the internet. You could just use one column but that’s not fun is it?
Leave a comment
Comments feed for this article