cmccullough Posted March 12, 2010 Share Posted March 12, 2010 Hello,I'm trying to create a table, of sorts, on my site but I can't seem to get the headers above the content. Also, I don't necessarily want it to look like a table where everything is "boxed" in but just a header above each piece of text. I've included the code that I'm using with the output. The "download link" text will be replaced with the actual download link when I get this set correctly. I would like the "download link" to be below the Newsletter and Menu headers but I just can't seem to figure out how to do it..<html><body><table border="0" width="100%" cellpadding="10"><tr><th>Newsletter</th><td width="50%" valign="top">Download Link</td><th>Menu</th><td width="50%" valign="top">Download Link</td></tr></table></body></html>Below is the output:Newsletter Download Link Menu Download LinkAlso, I was told that using CSS instead of HTML might be a better way of doing this? Would that be true?Thanks for your help! Link to comment Share on other sites More sharing options...
jeffman Posted March 12, 2010 Share Posted March 12, 2010 CSS does not replace HTML. They work together. And, yes, if you are getting serious about designing web pages, learning how to avoid table layouts and use CSS to style HTML elements is a good idea. The tutorials at W3Schools are a good start. This tutorial walks you through a very common design layout. It might not be what you're after, but it demonstrates some key principles.Your immediate problem is that you have all your elements in a single table row, so of course nothing lines up above anything else. Your basic pattern should be more like this (I left out the small details): <table> <tr> <th>header 1</th> <th>header 2</th> </tr> <tr> <td>content 1</td> <td>content 2</td> </tr></table> Link to comment Share on other sites More sharing options...
cmccullough Posted March 12, 2010 Author Share Posted March 12, 2010 Thank you for your help. I'm definitely going to have to read up on CSS.Is there a way to do this so there's no closed boxes, if that makes sense? Thanks again! Link to comment Share on other sites More sharing options...
jeffman Posted March 12, 2010 Share Posted March 12, 2010 Closed boxes? Sorry. I don't understand. Are you discussing borders? Link to comment Share on other sites More sharing options...
cmccullough Posted March 12, 2010 Author Share Posted March 12, 2010 Closed boxes? Sorry. I don't understand. Are you discussing borders?Exactly. Thank you for clearing that up. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.