Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unwanted Spacing In Between Tables

Status
Not open for further replies.

Krus1972

Programmer
Mar 18, 2004
145
0
0
US
I have the following webpage located at:


You will see a table with black border that has "Submit Link" inside. You will see another table below that that has "$9.95 1 year" in it.

For the life of me, there is unwanted space inbetween these tables and I cannot figure out WHY the heck it's there. There are no <br>, <TR> tags, or anything in the source code that would put this space there.

Can anyone tell me WHY the browser is placeing this vertical space in between these tables?

Thanks so much for your help.

Jeff
 
No, You don't need to be logged in.

Just view/copy the source code HTML from your browser.

 
Looking at the page you linked to, it does NOT include:

- any tables with borders
- any 'Submit Link' inside a table (only one in navigation)
- any '$9.95 1 year' text

So, either you're linking to a wrong page or my browser is showing something completely different.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
For a short time I had it where you needed a USWERID and password. This is porbably when you tried viewing it. Now you should be able to view the page. I have NO idea why that space is in between those tables.

You need to use Internet Explorer, not Firefox.

Any help would be appreciated.

 
I know it isn't a priority for you right now and falls inthe category of unsolicited advice, but in the future you may want to give some thought to instead of:

.red
{
FONT-WEIGHT: bold;
FONT-SIZE: 14px;
COLOR: #AA0000;
FONT-FAMILY: Arial, Verdana;
TEXT-ALIGN: center;
TEXT-DECORATION: underline;
}

.red2
{
FONT-WEIGHT: bold;
FONT-SIZE: 14px;
COLOR: #AA0000;
FONT-FAMILY: Arial, Verdana;
TEXT-ALIGN: center;
TEXT-DECORATION: none;
}

.red3
{
FONT-WEIGHT: bold;
FONT-SIZE: 11px;
COLOR: #AA0000;
FONT-FAMILY: Arial, Verdana;
TEXT-ALIGN: center;
TEXT-DECORATION: none;
}

.red4
{
FONT-WEIGHT: bold;
FONT-SIZE: 11px;
COLOR: #800000;
FONT-FAMILY: Verdana, Arial
TEXT-DECORATION: none;
}

.red5
{
FONT-WEIGHT: bold;
FONT-SIZE: 11px;
COLOR: #AA0000;
FONT-FAMILY: Arial, Verdana;
TEXT-ALIGN: center;
TEXT-DECORATION: none;
}

.red6
{
FONT-WEIGHT: bold;
FONT-SIZE: 13px;
COLOR: #AA0000;
FONT-FAMILY: Arial, Verdana;
TEXT-ALIGN: center;
TEXT-DECORATION: none;
}

Doing somthing like:

.red, .red2, red3, .red4, red6, red6
{
FONT-WEIGHT: bold;
COLOR: #AA0000;
FONT-FAMILY: Arial, Verdana;
TEXT-ALIGN: center;
TEXT-DECORATION: none;
}

.red
{
TEXT-DECORATION: underline;
}

.red, .red2
{
FONT-SIZE: 14px;
}

.red3, red4, red5,
{
FONT-SIZE: 11px;
}

.red6
{
FONT-SIZE: 13px;
}

.red4
{
COLOR: #800000;
}

could make it easier to catch (and change) stuff.

Especially given the number of places you use things like title2, title3, title4 and green, green2, green3 etc.
 
Solution for you:

Somewhere in your code (too messy for me to specify exactly where) you have the following:
Code:
9.95  1 Year</td></tr>[!]<br /><br /><br />[/!]</td>
The three line breaks are in a place where there should only be table elements. Since the browser gets confused, it puts them before the table.

Outside the solution:

Even for a table based design, your code is simply terrible. It is convoluted and uses mostly deprecated elements. It does not look like a company intranet page, where you could (potentially) afford to not support browsers beyond IE. I would really reconsider going through with the current design and maybe scrap it in favour of a more modern approach.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Vragabond - Thanks so much. That was the problem. I've been programming double time last few days. As a result, I have tunnel vision.

There is still a bit of unwanted space between the tables, but, I think I can live with it.
 
More renegade line breaks where they shouldn't be.
Code:
 I AGREE with the <a href="/Directory/rules.php" title="Submission Rules" target='_blank'>submission rules</a><br /><br /></td>[!]<br /><br />[/!]</tr><tr><td colspan="2" class="buttons">
Your problem would not exist if you didn't use tables because you wouldn't have the issue of elements where they cannot exist. You would find the problem quickly and easily, if you properly indented your code. If you worked with correct and modern code, you could use a validator service to look for the errors you were experiencing. But I can imagine why you would not want to use validation on that page.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Agreed.

That's a script that I bought thatallows you to run a directory on your website. The script is VERY comphrehensive and it uses PHP with Smarty. I am just modifying it so that it looks decent on my website.

Thanks so much for your help. I've been doing so much programming the last few days and I have serious tunnel vision. I wouldn't caught that because that code is mixed with the server side Smarty script and it is not properly intended. It's very difficult to follow, but, it's the best Directory script available.

Thanks again!

Jeff
 
Vragabond,

I have another problem that is simular at this same page:


You will see two (2) areas that have a thick black border.
One is on the right and the other is toward the bottom. I am trying to remove the area within the black border on the BOTTOM without deleting the area on the right. For the life of me I have NO IDEA why the area on the bottom is there and why the browser is placing it there. Somehow, this space is placed there from the table on the right. I have no idea why.

Could you take a quick look?

Thankyou so much
 
For the (I stopped counting)th time, as long as your code is such a blundering mess, you can't expect browsers to do anything smarter with it. I am sick and tired of looking through your mess and finding obvious mistakes which should not be there in the first place, if you had listened to my ADVICE rather than mooched off my SOLUTIONS.

Your problem is most likely linked to these faulty table tags:
Code:
Regular links w/ unlimited article submit -&nbsp;&nbsp;&#036;19.95 per 1 Year</td></tr><tr><td height="20"></td></tr>[!]</td></tr>[/!]<tr><td colspan="2" class="label" align='left'>

Once again, this:
1. Would not exist if you didn't try to put every piece of your code in a table or table cell. There's no tabular data on your page -- why are you insisting on tables?
2. Would be absolutely no problem to fix if you idented your code properly -- you would see the problems from miles away.

Please, for your own sake, download IE Tester with Debugbar and work in that to find your mistakes.

I am not entirely sure how many toy soldiers I need to pull out of your nose before my advice not to stuff them there in the first place will show some effect.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
That isn't it. I removed those tags you have in red and the damn thing is still at the bottom.

I agree.

This is NOT my programming. It is a script that I bought and I am just doing simple changes. Simple things like this just isn't simple which isa why I am asking for a second set of eyes.

I would NEVER do my code like this..

I am just clueless as to why that portion at the bottom is STILL showing.

 
Remove the closing </form> tag from where it is. And put somewhere where else.

Code:
type="submit" name="submit" value="Continue" class="btn" /></center></td></tr>[red]</form>[/red]</td></tr></table></td></tr></table></TD></TR></TABLE><table width="973" align="center"  CELLSPACING="0" CELLPADDING="5" border="0">


Now If I had paid for this mess, I'd return it immediately and ask for my money back.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top