
Originally Posted by
Another Designer
Okay, it's learning time. If I don't use tables (which I finally feel I have mastered), what do you suggest I do? I started using Layers (yes, in Dreameaver), and they never staid in the same place in different browsers.
Nope, layers are not the way to go. Centauri mentioned it but I will go a little further but before I start let me just say (not aimed at you BTW)
Notepad? Aw come on folks! There are great editors out there and a ton of them ... no one needs to go back to notepad. I used Edit Plus, there is Ultra Edit, DW (in code view only) etc etc.
Anyways back to your question:
Real quick example here, a menu header and some text
old way (your way right now)
HTML Code:
<table>
<tr>
<td colspan='2'> header image </td>
</tr>
<tr>
<td>
<table id='menu'>
<tr>
<td>menu item</td>
</tr>
<tr>
<td>menu item 2</td>
etc etc etc
</tr>
</table>
</td>
<td>
content goes here
</td>
</tr>
<tr>
<td id='footer'>
footer info here
</td>
</tr>
</table>
MAN that was painful to write!
'New way'
HTML Code:
<div id='header'>you header here</div>
<ul id='menu'>
<li>menu item</li>
<li>menu item two</li>
<li>etc ect ect</li>
</ul>
<div id='content'>
Your content here
</div>
<div id='footer'>
You footer info here
</div>
Now of course you need to style that but just looking at the code doesn't it make a HECK of a lot more sense than the old way? And granted this is a simplified version, some might (myself included sometimes) wrap the menu ul in a div, there can be all sorts of other elements in the ones above but I think you see the point.
Trust me, once you get into tableless code and really learn it you will look back and say "Why the heck did I EVER use tables?" I know because I say it all the time (yes there was a time when I coded just like you do now)
Bookmarks