• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Blast! What's wrong with this HTML?

etalns

Diamond Member
I just started doing some web designa gain recenetly, haven't touched the stuff in a while.

I can't figure out what's wrong with this code.

------ begin code ------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Qosis</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style></head>

<body>
<table width="100%" height="100%" border="0">
<tr>
<td><div align="center"><img src="logo.jpg" width="178" height="78" align="absmiddle"></div></td>
</tr>
</table>
</body>
</html>

------- end code----

You can also view the page here

I'm trying to center the image in the middle of the page. I remember being able to just make a table that was 100% x 100% and then placing the image in the middle. It looks fine in dreamweaver, but when I save it is when I run into problems.
 
Should have been posted in software/programming but, throw a border = 1 on your table and see where the table actually is.
 
The table is limited to the top at the moment. It has 100% width, but not 100% height. Is there anythingat the code that would cause that?

And thank you to everyone for all the helpful replies 🙂
 
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" valign="middle"><img src="...........
 
Originally posted by: Qosis
The table is limited to the top at the moment. It has 100% width, but not 100% height. Is there anythingat the code that would cause that?

And thank you to everyone for all the helpful replies 🙂

I've found that 100% height really doesnt work too well, and there are very few uses to use it (other than what you're mentioning here). Try throwing just a pixel height on the table, or use a style

<table style="height:100%; width:100%"...
 
Originally posted by: GtPrOjEcTX
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" valign="middle"><img src="...........

It's still sitting at the top with that code 🙁
 
The html as written above works fine but if you compare that to the code on your page that you linked to, you will see that align="absmiddle" is missing from the img tag.
 
Originally posted by: jjones
The html as written above works fine but if you compare that to the code on your page that you linked to, you will see that align="absmiddle" is missing from the img tag.

This is what I have at the moment, even with the align in the code it still isn't working :S

---- Begin Code -----

<html>
<head>
<title>Qosis</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style></head>

<body>
<table>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="1">
<tr>
<td align="center" valign="middle"><center><img src="logo.jpg" width="178" height="78" align="absmiddle"></center></td>
</tr>
</table>
</body>
</html>

----- End Code -----
 
Back
Top