Click to See Complete Forum and Search --> : Tables annoyingly appearing side by side
jesterpunch
06-10-2007, 06:32 AM
Hello folks,
I have a script that has two tables in it:
<table>
</table>
<table>
</table>
Now in the normal world where things aren't out to get me these tables would appear one under the other, however, for some reason, they insist on being side by side.
Please take look:
http://theunsentletter.com/wdap/Assignment_2/index.php
and tell me what I've done wrong! How can I fix it?
You still have too many html and body elements
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Ftheunsentletter.com%2Fwdap%2FAssignment_2%2Findex.php
jesterpunch
06-10-2007, 06:46 AM
You still have too many html and body elements
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Ftheunsentletter.com%2Fwdap%2FAssignment_2%2Findex.php
Oh, but they're from embedded php files... they shouldn't effect the page, or at least they haven't affected it up until the time where I added that second table.
Remove align left:<body>
<table width="750px" align="left" border="0" cellpadding=10>
<tr>
Why tables for layout is stupid (http://www.hotdesign.com/seybold/)
Oh, but they're from embedded php files... they shouldn't effect the page, or at least they haven't affected it up until the time where I added that second table.They shouldn't be there.
FusionComputers
06-10-2007, 01:51 PM
This is for a school project. I highly doubt jesterpunch really needs to worry about XHTML standards. They're more work than they're worth.
Mr Initial Man
06-10-2007, 04:34 PM
Oh, but they're from embedded php files... they shouldn't effect the page, or at least they haven't affected it up until the time where I added that second table.
Then fix the embedded PHP files. You don't NEED a </body> or </html> tag in a php file, UNLESS it's gonna be the last include in the file. A php include (or an include from any other language that goes into a page) contains PART of the page, not an entire page.
This is for a school project. I highly doubt jesterpunch really needs to worry about XHTML standards. They're more work than they're worth.
I beg to differ: That is a ridiculous statement for four reasons:
He's not using XHTML in the first place (unclosed empty elements are a dead giveaway there).
Not following standards is what got him into trouble in the first place.
If you're following standards from the get-go, server-side scripting becomes far more predictable and easy to work with
Standards really aren't that hard to follow.
JesterPunch, end your document and your body when (and only when) you're ready. Not before. What's happening is your browser is getting confused by all the end tags, and its saying something along the lines of "WHAT?"
As I said earlier, edit the PHP includes, and you'll have an easier time.
One last question: Do you really NEED to use tables for layout?
FusionComputers
06-10-2007, 05:22 PM
After doing http://www.fusioncomputer.net in block level elements, I'm having a difficult time accepting this as a viable development strategy. I've spent more time trying to fix display issues with this site than I have writing code for the site. Five minutes, a little CSS, and a table layout is done for the most part. I've spent hours on end trying to fix that site's layout, it's not funny.
http://www.stalkersofchernobyl.com uses a table layout, and I managed to get that done without all the headaches of the other site.
Table layouts are easier to design, and if you have solid code backing up your Web site, you do the layout once, and don't have to touch it again. Perhaps you'd like to point out where I'm going wrong with my CSS (http://www.fusioncomputer.net/css/css.css) and CSS2 (http://www.fusioncomputer.net/css/css2.css) for http://www.fusioncomputer.net ? I'd like 5px margins all around the content of the site, and for the blocks to size according to whichever resolution the user is working in, and still maintain 5px margins all around the page. Oh, blocks are disappearing as well, depending on the size of the window. Perhaps you have some ideas on how to fix those as well.
jesterpunch
06-10-2007, 06:56 PM
Look guys, thanks for your help...
The honest truth is that I don't use <DIV> for CSS for table layouts for various reasons.
Firstly: I am paying to do this university course yet nobody has taught be how to use tables in such a way. We had 30 minutes about CSS, a couple of hours copying some code to show how we can change colours and fonts, and that was it, the very next week we moved on to Javascript. It is a poorly taught course and I think that even if I do hand in crap I'll get good marks as long as I use each langauge in some way.
Secondly: I didn't want to teach myself. I am absolutely 100% positive that I could teach myself all these languages, but I didn't. I thought, No, I'll go to uni and I'll get taught! How wrong I was about that, I should have just taught myself, instead of forking out a lot of money for a course where I have to teach myself anyway.
Thirdly: I haven't got the time to move away from using tables. I am a full time teacher and I regret the insanity I used in deciding to take on a few university classes as well. I am so exhausted that I haven't got the time to experiment with alternative table methods, especially when I am spending so much time understanding the poorly taught PHP and MySQL elements that I am also trying to learn. This asisgnment is due on Wednesday and as long as I can get my tables in the correct place I can finish it.
One day I would like to teach myself all this... I just need to find some good tutorials!
Mr Initial Man
06-10-2007, 07:28 PM
I know how you feel, Jesterpunch. I've taken a similar course myself. CSS, Javascript, and HTML can ALL be taught as seperate classes. It's nuts.
Orc Scorcher
06-11-2007, 03:33 AM
(Edit: never mind, looks fixed now).