Honestly, I never learned how to actually write HTML with tables. I went straight to divs after learning about their existence (Thanks to Microsoft Expressions Web).
Div's are very, very simple to use, and should only take a very short tutorial to understand.
What is a div?
Ah, this question. This can be explained in two words.
Invisible Box
That is it. It is just an invisible container. Just like a table, but SO MUCH SIMPLER.
How would you use a div you ask? Just like this.
<div></div>
A lot of you might be saying, "You're joking." But I say nay! This is it. This is why divs are so spectacular advancement in web development technology. Now I'm going to create a basic structure using divs.
<html>
<body>
<div id="wrapper">
<div id="header">
</div>
<div id="navigation">
</div>
<div id="content">
</div>
<div id="footer">
</div>
</div>
</body>
</html>
That's it. That is all. Nothing else. Nothing more. That is how simple divs are. And just like everything else in HTML, they use the hierarchical system, a div can go inside a div, and a div inside that, and so on and so forth. Forever, and ever. You could make endless divs.
These can also be styled a lot easier than tables. For instance, if we give a div a class, we could make a lot of the same looking buttons.
<div class="blue">Words</div>
.blue {
background: blue;
color: white;
padding: 10px;
margin: 10px;
}
Ba-BAM! That's my new catch-phrase by the way. That's it. That's all there is too it.
I hope I have brought some of you older web designers into the future about how to be designing for more web-safe, and a lot less stressful and cleaner ways to write code.
Thank you,
Andrew Gould






MultiQuote





|