Click to See Complete Forum and Search --> : Problem with table location shifting


hadoob024
02-14-2006, 01:38 AM
This is a weird problem that I just noticed and can't figure out why it's happening. If I fill out information on a form on my page, click "submit", then click the "back" button on the browser, the location of the table for the form shifts to the left. What would cause this? I'm just using simple tables, and I've set the "align" attribute of each table to "center". You can see it yourself at:

Add Listing (http://www.ownersfinancingrealestate.com/addlisting.php)

JPnyc
02-14-2006, 06:39 AM
Well that's not close to a valid HTML document so it could be anything. No coding must precede the head of the document.

hadoob024
02-14-2006, 11:55 AM
Hmmm... Thanks. That's what I thought too, but I couldn't figure out how to design the layout of the page then. I wanted to create 1 table. The 2 columns of the first row of the table has the two images, the first column of the second row has the menu, and then the second column of the second row is where all the info goes. So I created a PHP file that has all the table layout stuff, and I include this file at the beginning of all my pages. But maybe I should include it in all my pages, but after the header information? Would that help?

JPnyc
02-14-2006, 12:00 PM
Not possible for me to say, but it's where you have to start. Placing code after the head info won't change the appearance since the head info doesn't disply. But if you go to the w3c validator, that page has 261 errors, so I would say clean up most of that and then maybe we can narrow down the cause of the movement issue

hadoob024
02-15-2006, 02:15 PM
OK. I moved the layout code, and now I'm down to 16 errors. I can't really tell why some of them are errors, and I can't tell if the ones listed are causing any of the problems.

But it seems that sometimes, and not just when clicking on the back button, but when just clicking on the "add listings" link, sometimes the table shifts to the left, and sometimes it's centered (where it should be).

What's also really weird is that the code for this "add listings" page and the "search listings" page (below) are the same except for the items in the table. But for some reason, the "search listings" page doesn't do that weird shift thing that the "add listings" page does.

Search Listings (http://www.ownersfinancingrealestate.com/searchlistings.php)


Any thoughts???

Weedpacket
02-16-2006, 04:47 AM
The validator at W3C currently counts 11 errors (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.ownersfinancingrealestate.com%2Fsearchlistings.php) with that page. The most interesting ones in this instance are those that involve apparently misplaced <center> tags. (I kind of forgot that there were center tags in HTML; I've gotten so used to alignment styles in <div> elements .... then again, it's been more than five years since I've used <font> tags either....)

hadoob024
02-16-2006, 12:25 PM
That's weird because as far as I can tell, the search listings page works fine. It's just in the add listings page, where the problem with the table shifting occurs. Can you see anything with that page that might be causing the problem?

Weedpacket
02-16-2006, 05:46 PM
Er, the table doesn't shift as far as I can see .... nope, it doesn't shift. By not so much as a pixel. I just measured it.

What I do see is that the page heading on the two pages (step 1 and step 2) is aligned differently. It may have something to do with the different positioning of your closing </font> tag. No, there's also the fact that one of those pages has a vertical scrollbar and the other doesn't, so something that's been aligned to the right moves with the changing width of the window.

And sheesh, learn CSS already! It's only been around for like seven years :)

hadoob024
02-16-2006, 06:32 PM
Really?!? Now I'm really confused as to what's causing the problem. What browser are you using? I'm using Firefox and am wondering if that's causing something to happen (cuz I know it's causing another issue that I have). Look here, I took a couple of screen shots to show what I'm seeing with this shifting table:

http://www.ownersfinancingrealestate.com/screenshot.htm


Oh yeah, what closing "font" tag are you talking about? Yeah yeah yeah, I know about CSS. Basically, I haven't done any web work for about 5-6 years and then all of a sudden had this project thrown my way. I'll get around to it. Trying to learn the PHP stuff right now :D

Weedpacket
02-18-2006, 03:34 AM
Firefox (to be precise, Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1)

Nope. I'm certainly not seeing that (heh, just noticed you started out by saying "simple tables":)). But here's an idea: cut-and-paste the generated HTML for both pages into separate files, and do a diff to see exactly what changes between them.

hadoob024
02-18-2006, 02:03 PM
you must've read my mind. that's exactly what i did last night. i waited for the shift to occur, then did a "view source" and printed out the 2 different versions of "add listing". it was late though, so i didn't get a chance to go through them line by line. that's today's job. joy! i haven't had to do one of these line by line comparisons for a while.

oh yeah, did you check out the link to see the difference that i'm talking about? that's weird, and you don't see it, huh?

Weedpacket
02-19-2006, 05:57 AM
Yep, checked your screenshots, don't see that (did you notice the left column containing the field descriptions also changes width? Maybe that's a clue).