PDA

View Full Version : please help with stoooopic table :)




BakedBeans
Nov 24, 2004, 05:23 AM
HOPE YOU CAN HELP....


on this (http://excoboard.com/exco/thread.php?forumid=49527&threadid=181284) page i cant get the table to align with the top, please help :)



Godfather
Nov 24, 2004, 07:09 AM
Remove the <br /> commands and you will have it near top.

BakedBeans
Nov 24, 2004, 08:10 AM
<TABLE BORDER="10" ALIGN="top">
<THEAD valign="centre">
<TH>SOLD/LOANED</TH><TH>BROUGHT</TH><TH>INJURED</TH>
<TR>
<TD>Owen</TD>
<TD>Alonso</TD>
<TD>Cisse</TD>
<TR>
<TD>Heskey</TD>
<TD>Garcia</TD>
<TD>Baros</TD>
</TR>
<TR>
<TD>Cheyrou</TD>
<TD>Nunez</TD>
<TD>Garcia</TD>
</TR>
<TR>
<TD>Murphy</TD>
<TD>Josemi</TD>
<TD>Nunez</TD>
</TR>
<TR>
<TD>Diouf</TD>
<TD>Cisse</TD>
<TD>Josemi</TD>
</TR>
<TR>
<TD>Babbel</TD>
</TR>
<TR>
<TD>Vignal</TD>
</TR>
<TR>
<TD>Diarra</TD>
</TR>
<TR>
<TD>Le-Tallec</TD>
</TR>
</TABLE>

mnkeybsness
Nov 24, 2004, 05:14 PM
probably has to do with putting a block element inside an inline element... you have a table inside of a span... not the best idea.

and secondly, valign="centre" is not quite right.

Sammie
Nov 25, 2004, 07:39 PM
HOPE YOU CAN HELP....


on this (http://excoboard.com/exco/thread.php?forumid=49527&threadid=181284) page i cant get the table to align with the top, please help :)

Stop using measurements in % such as this from your source code (width="95%") Those are stupid to use and use measurements such as width="760" and always remember that a screen can only see 72 pixels per inch or 72 dpi. So just times 72 per inch, also worke with height. I never use % for table size. Grab the bottom of your page and drag it out! See how it pulls your tables in and out. Using pixel size is better and I recommend a 760X500 total size window is the best as not all people have 17 or bigger screens. Of course it should be able to scroll up and down

I am sure that is your problemo. I know!

Hope that helps. :)

SAMMIE

mvc
Nov 25, 2004, 08:47 PM
Kill me, read the one below!

mvc
Nov 25, 2004, 09:02 PM
Ok, I think I know what you are talking about now - you just mean that little table in your posting, not the whole page code???

Your table code looks like this in source view in Safari:

<TABLE BORDER="10" ALIGN="center"><br />
<THEAD valign="centre"><br />
<TH>SOLD/LOANED</TH><TH>BROUGHT</TH><TH>INJURED</TH><br />
<TR><br />
<TD>Owen</TD><br />
<TD>Alonso</TD><br />
<TD>Cisse</TD><br />
<TR><br />
<TD>Heskey</TD><br />
<TD>Garcia</TD><br />
<TD>Baros</TD><br />
</TR><br />
<TR><br />
etc etc......


This table is definitely mega ugly code, all these <br /> tags outside the table cells will probably give most browsers a bad hair day!

In the case of Safari I suspect it is rendering all those <br /> tags first, then displaying your table, so it ends up miles down the page with about 50 <br /> tags above it.

It looks like you have been putting in <br /> tags accidentally, perhaps you meant to just make new lines in the code window of dreamweaver or something, and it has slapped in <br />'s for you?

Or do you have some automated nl2br (newline to break) function at work in this forum that is filtering your code when it gets displayed?

If that's the case your code might look ok to you in dreamweaver, but the page gets all these extra <br />'s wherever you have put in new lines.

As an experiment, try taking out all the code formating of your html for that table, you will end up with one great big long ugly line of code for the table, a bit like this:

...<TR><TD>Owen</TD><TD>Alonso</TD><TD>Cisse</... etc etc

Then stick that in and see if that works. If it does, its a nl2br function in the forum.

BakedBeans
Nov 26, 2004, 12:47 PM
Put your hand up if you didnt know not to press enter after each tag

*slowly raises hands :D*

i didnt use a wysiwyg i wrote it in html, im so silly :D

scem0
Nov 26, 2004, 01:18 PM
and if you want it right next to the top, you could use the css "margin-top: 0px;" and body's "margin: 0px; padding: 0px;" attributes.

But I think that would look ugly, so I wouldn't do that. ;)

scem0

BakedBeans
Nov 27, 2004, 03:40 AM
thanks for your help though guys.... im just about to embark onto a web design course :)

so just starting oput at the moment

Godfather
Dec 1, 2004, 09:27 AM
Put your hand up if you didnt know not to press enter after each tag

*slowly raises hands :D*

i didnt use a wysiwyg i wrote it in html, im so silly :D

Like I said, remove the BR lines. (enters)...

chanoc
Dec 2, 2004, 08:48 PM
thanks for your help though guys.... im just about to embark onto a web design course :)

so just starting oput at the moment

Forget tables, use CSS. See my site, link at bottom.