using tables to make a blank square

admin

Administrator
Staff member
i am trying to make a square on the page colored in black using tables... but the problem is that, the square will only show up if there's html inside the table. i just want a blank black square with nothing in it<br />
<br />
<br />
here's what i have so far...<br />
<br />
<br />
<br />
<DIV id="updatestable" style="position: absolute; top: 250px; left: 10px;"><br />
<br />
<table width="100" class="bordercolor" cellpadding="0" cellspacing="0"><br />
<tr bgcolor="#000000"><br />
<td colspan="1" width="100" height="100" valign="left"><br />
<br />
<div><!--content-->you're missing several closing tags such as </td></tr></table><br />
and several of your tags are deprecated, such as height, width, valign & bgcolor, all replaced with css<br />
<br />
an empty cell needs to have &nbsp; in it.<br />
<br />
why not make your div the black box?<br />
<br />
validating your code always helps solve problems <br />
<br />
<!-- m --><a class="postlink" href="http://validator.w3.org">http://validator.w3.org</a><!-- m --><!--content-->Originally posted by leoo24 <br />
you're missing several closing tags such as </td></tr></table><br />
and several of your tags are deprecated, such as height, width, valign & bgcolor, all replaced with css<br />
<br />
an empty cell needs to have &nbsp; in it.<br />
<br />
why not make your div the black box?<br />
<br />
validating your code always helps solve problems <br />
<br />
<!-- m --><a class="postlink" href="http://validator.w3.org">http://validator.w3.org</a><!-- m --> <br />
<br />
that was just a snippet of the code. <br />
<br />
how would i use the div to make a black box?<!--content-->ahh, i see :)<br />
<br />
<div style="width:100px;height:100px;background:#000000;">&nbsp;</div><br />
<br />
although a div doesnt require &nbsp; i put it in out of habit.<!--content-->Originally posted by sharpdust <br />
that was just a snippet of the code. <br />
then don't say "here is what I have so far"<br />
<br />
if you want us to give an respectable answer then you need to show all the code that pertains to the question, not part of it.<br />
<br />
this hleps you and us in finding an answer.<!--content-->Originally posted by leoo24 <br />
ahh, i see :)<br />
<br />
<div style="width:100px;height:100px;background:#000000;">&nbsp;</div><br />
<br />
although a div doesnt require &nbsp; i put it in out of habit. <br />
<br />
thanks<br />
<br />
<br />
Originally posted by scoutt <br />
then don't say "here is what I have so far"<br />
<br />
if you want us to give an respectable answer then you need to show all the code that pertains to the question, not part of it.<br />
<br />
this hleps you and us in finding an answer. <br />
<br />
don't be rude. i would have expected some more respect from this website.<!--content-->I didn't mean to sound rude, I was just letting you know in the future that if you want help we need to see all of the code that pertains to the question.<br />
<br />
you will get the same response on other forums as well. jsut letting you know.<!--content-->
 
Back
Top