a quick tables question....

liunx

Guest
hey all, i am new to this forum, so hello would be a good place to start, i guess :)<br />
<br />
anyway, i have been working with html for years, but have always hated tables, mainly because they just have a habit of annoying me. now, though, i want to use them (typical eh?) and i just wondered if what was happening was normal.<br />
<br />
the code that i am using is thus:<br />
<br />
<br />
<table align=left width="100" border=1><br />
<tr><br />
<td>Menu Table<br />
</td><br />
</tr><br />
</table><br />
<br />
<table align=center width="600" border=1><br />
<tr><br />
<td>Main Table<br />
</td><br />
</tr><br />
</table><br />
<br />
<table align=right width="75" border=1><br />
<tr><br />
<td>Third Table<br />
</td><br />
</tr><br />
</table><br />
<br />
<br />
<br />
the thing that i don't get is, there are three tables, no line breaks, and they have three seperate alignments...<br />
<br />
so why does the third table end up on the next line down? is there a limit of two tables to a page or something?<br />
<br />
no that's just rubbish i am talking, because if i change the table that is aligned to the center to being aligned to the left, it works, but its just not working the way i want it to.. <br />
<br />
hmm, hang on if i change the order around, and have it aligned left, aligned right and then aligned center it does exactly what i want... which means that this post is now kinda defunct. but i will post it anyway, in case anyone else has the same query in the future, and in case anyone can tell me why they have to be in that order? lol.<br />
<br />
<br />
EDIT: Oh, hang on, there is still a question here - when i resize the IE window using this code:<br />
<br />
<br />
<table align=left width="100" border=1><br />
<tr><br />
<td>Menu Table<br />
</td><br />
</tr><br />
</table><br />
<br />
<table align=right width="75" border=1><br />
<tr><br />
<td>Third Table<br />
</td><br />
</tr><br />
</table><br />
<br />
<table align=center width="600" border=1><br />
<tr><br />
<td>Main Table<br />
</td><br />
</tr><br />
</table><br />
<br />
<br />
the third table (aligned left) overlaps the center table. is there anyway to stop this?<!--content-->ok, first your line break problem is real easy. all your table cells have to be on 1 line.<br />
<br />
<table align=left width="100" border=1><br />
<tr><br />
<td>Menu Table</td><br />
</tr><br />
</table><br />
<br />
not<br />
<br />
<br />
<td>Menu Table<br />
</td><br />
<br />
also the overlapping? my guess is that you are going 775 pixels wide so that might be why they are over lapping. just make all 3 tables 100% or 33% each or put all three tables in one big table tha thas 3 cells, each table in it's own cell<!--content-->To start with align should have speech marks: align="left"<br />
<br />
Secondly tables are block level elements. From reading your post it seems you are trying to get them to line up next to each other. You can't have tables on the same row without nesting them inside another table.<br />
<br />
If you want them to be on the same row nest them or do this:<br />
<br />
<table align="center" border="1"><br />
<tr><br />
<td width="100">menu table</td><br />
<td width="600">main table</td><br />
<td width="75">third table</td><br />
</tr><br />
</table><br />
<br />
How you get a table to overlap another one without using CSS I have no idea?<!--content-->Originally posted by entimp <br />
Secondly tables are block level elements. From reading your post it seems you are trying to get them to line up next to each other. You can't have tables on the same row without nesting them inside another table. <br />
why?? what he has works just fine all on one line<!--content-->I am shocked!!! I have never tried to render tables like this as I have always assumed that because they are block level elements they will always be forced onto the next line. I stand corrected but I would never attempt this myself.<br />
<br />
<!-- m --><a class="postlink" href="http://www.htmlhelp.com/reference/html40/block.html">http://www.htmlhelp.com/reference/html40/block.html</a><!-- m --><br />
<br />
Hmmmm... if it works it works... but I would suggest against using tables in this format. I have just tried that code in Explorer and it works on one line but is the same on all browsers?<!--content-->thanks muchly for the help :) it's all pretty much sorted now. still gettig the overlap if you reduce the window to a stupidly small size, but i have overcome that by deciding to display the site in a set-size window, so that's ok.<br />
<br />
with regards to if the system works in other browsers aside from IE, for once i am not that bothered, as the only people who will be viewing this site are my friends and family, really, and they all use IE.<br />
<br />
oh, another thing - CSS, i have this in my css file:<br />
<br />
body<br />
{<br />
background:#ffffff;<br />
color:#000000;<br />
font-family:Arial;<br />
font-size:8pt;<br />
scrollbar-3d-light-color:#6699ff;<br />
scrollbar-arrow-color:#6699ff;<br />
scrollbar-base-color:white;<br />
scrollbar-dark-shadow-color:#0066ff;<br />
scrollbar-face-color:white;<br />
scrollbar-highlight-color:#6699ff;<br />
scrollbar-shadow-color:#white;<br />
}<br />
<br />
and before i even get around to sorting out the colors (yup, it's a recycle hehe), would any of you happen to know how i can actually take control over the font size? as the font-size:8pt; line does nothing at all... lol...<!--content-->Originally posted by freakishkid <br />
<br />
<br />
and before i even get around to sorting out the colors (yup, it's a recycle hehe), would any of you happen to know how i can actually take control over the font size? as the font-size:8pt; line does nothing at all... lol... <br />
<br />
This should do the trick:<br />
<br />
<br />
table<br />
{<br />
font-family:Arial;<br />
font-size:8pt;<br />
}<!--content-->as far as teh tables being on one line it should work in all browsers. it is generic code and not browser specific. but in order to get out of overlapping you need to use only 1 table.<!--content-->hey Artic Dragon, you suggested:<br />
<br />
<br />
table<br />
{<br />
font-family:Arial;<br />
font-size:8pt;<br />
}<br />
<br />
<br />
but this is exactly what i have and it doesn't seem to make a diff to my page when i alter the value higher or lower than 8...?<!--content-->that is the best you can do, it is suppose to be permenant but you can't stop them from using the browsers text enlargment.<!--content-->
 
Back
Top