Click to See Complete Forum and Search --> : div tag in a table.
lilsammy
10-06-2006, 06:23 AM
Hi guys my first post to ever ask for help. Well i got a problem with a html page for my website http://ftc-gaming.co.uk/ Where that on the news/home page i have this problem (http://ftc-gaming.co.uk/images_for_linking/problem.png) and i was to make it so the div area aligns to the top of the table so that it just looks more professional.
Edit: I am trying to make this valid html but i still got 15 errors so if you could try to give me a valid sulotion that be nice. the doctype is,
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
You need to add a vertical align attribute: valign="top" to the table cell (<td>). (But, if you want to use CSS, try style="vertical-align: top" in the table cell tag.
Great that you're wanting valid coding!
First, your document isn't a frameset -- it looks like a straight HTML page to me. In that event, you'll want to use this DOCTYPE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
The missing "alt" tags are due to your images not containing descriptive text. You use alt tags to give the viewer an idea of "what they're missing" if the image fails to download.
<img src="file.jpg" alt="photo of a person" /> -- Like that.
Your other errors are usage of HTML attributes, which would be better handled using CSS. I suggest you look at http://www.w3schools.com/css/default.asp to find the CSS equivalents of the margin/padding/alignment attributes you've used.
Good Luck -
KDLA
lilsammy
10-06-2006, 07:36 AM
Yeah i didnt know what doctype to use, I chose framset for the simple reason it gave the least errors when i validate it. I will try loose, I thought it would be some css just didnt know what to use.
Thanks again.
(Well, you don't choose a doctype to avoid errors, but one that is best for the visual representation of your page: http://www.alistapart.com/stories/doctype/) ;)
KDLA
lilsammy
10-06-2006, 09:01 AM
Valid *Dances around a little*