Solved

Trouble with Tables 2 ....

Posted on 2000-02-23
17
167 Views
Last Modified: 2010-04-09
I am having difficulties getting tables to do what I want them to do!
The example of the problem, with a short explaination is at this URL:

http://www.angelfire.com/nf/Viking1000/

I would really appreciate assistance.
0
Comment
Question by:Luby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 4
17 Comments
 

Author Comment

by:Luby
ID: 2552877
Although I have given the points for the question in a previously posted message, the answer was not exactly what I was after. Therefore here it is again.
The text of the URL asks:

"Why does this work like this, and how can I set the table so that 1)equal widths are in the columns at either side of the image and 2)the image fills the middle column. I've tried several variations using % size and pixel size for each column. (Perhaps you should not
mix % and pixel in the same table??)
3)Important: I would also like to set the table width in % of screen size NOT in pixel size.
0
 
LVL 1

Expert Comment

by:sureshkumar
ID: 2553236
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%"
BACKGROUND="key.gif">
<tr>
<td>&nbsp;</td>

<td><img SRC="graphic.gif" height=72 width=500></td>

<td>&nbsp;</td>
</tr>
</table>

now you can adjust widths of cells what ever you like it

further queries
sureshkumar
0
 

Author Comment

by:Luby
ID: 2554235
Ok sureshkumar,
I have added the code you suggested. In fact I added thirty (30) of the &nbsp; html characters in between each of the tags. The problem is still that the center column isn't filled by the 700 pixel wide graphic! How do I set the column in the center to be no wider than 700 pixels, when the table size is set in the <table> tag to 100%?

See updated URL for progress.

http://www.angelfire.com/nf/Viking1000/
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:MorFF
ID: 2555339
Nope guys, this is the way to do it.

<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" BACKGROUND="key.gif">
<tr>
<td WIDTH=20%></td>

<td WIDTH=60% ALIGN=CENTER><img SRC="graphic.gif" height=72 width=500></td>

<td WIDTH=20%></td>
</tr>
</table>

You can now fiddle with the width of the individual table cells, and the graphic will always centre in the middle cell.

Cheers - MorFF
0
 
LVL 3

Expert Comment

by:MorFF
ID: 2555342
PS, you don't need any &nbsp 's either
0
 

Author Comment

by:Luby
ID: 2555584
OK. Now I've tried MorFF's way using 40%-60%-40% and table width=100%. You can see the results at the same URL as listed above.
This doesn't seem to work either. I am using netscape 4.7 to view. Could this make a difference?
Who's volley?
0
 

Author Comment

by:Luby
ID: 2555605
..of course the above should have read 20%-60%-20%   typo...oops!
0
 
LVL 3

Expert Comment

by:MorFF
ID: 2557596
Looks just fine to me v (I'm on ie5 tho')  I'll have a look via netscape tho', you play keepy-uppy just now.

Cheers - MorFF
0
 

Author Comment

by:Luby
ID: 2557995
I hang on...
0
 
LVL 1

Expert Comment

by:sureshkumar
ID: 2560315
hi luby,

the main problem is

you have to reduce the image size otherwise even though you are adjusting the cell width the navigator never recognise.

So solutions are :

1.take small image.

2. adjust image width and height (problem is clarity will reduce).


further queries
sureshkumar
0
 
LVL 3

Accepted Solution

by:
MorFF earned 100 total points
ID: 2564630
Luby,

Tried with Netscrape (v4.5 is the latest I've got)

If you put a couple of &nbsp's in the empty table cells, the background gif will display in them again (code pasted below).  I think it's to do with Netscape not displaying empty cells - even the background.  Another thing is that it doesn't tile as nicely as it does in IE either.

Cheers - MorFF

<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" ALIGN=LEFT BACKGROUND="key.gif">
<tr>
<td WIDTH=20%>&nbsp</td>
<td WIDTH=60% ALIGN=CENTER><img SRC="graphic.gif" height=72 width=500></td>
<td WIDTH=20%>&nbsp</td>
</tr>
</table>

0
 

Author Comment

by:Luby
ID: 2564889
This is it! This does exactly what I was looking for. It must be the combination of specifying the percent values and adding the &nbsp; to the empty cells. Strange that it behaves differently when specifying the column width in pixels, but that's tables for ya. I would never want to teach HTML considering the exceptions to this and that. There seems to be a special way to do everything. No "pat" answer seems to exist for all situations, particularly when dealing with tables and the cross-platform problems.
Thanks for your time and thanks to all the others who made great attempts at providing the best answer. Hopefully we all learned sometime in this exercise.

Good Day all!
0
 

Author Comment

by:Luby
ID: 2564910
"...all learned something...." gotta learn to type.

8^)
0
 
LVL 1

Expert Comment

by:sureshkumar
ID: 2567569
i have given same answer to you.But i unable to understand why you rejected my answer and accept same answer from someother one.This is very bad.Dont do such foolish things again.


Note:
I am giving this comment only for your future reference not for points.


sureshkumar
0
 
LVL 3

Expert Comment

by:MorFF
ID: 2568095
sureshkumar;

The point of EE is that the 'Experts' help the 'questioners' to solve their problems.  If your answer did not solve the problem in the question, then the questioner has every right to reject the answer or ask for further clarification.

Coming back on to chastise the questioner for accepting an answer that solved his problem does noone any good.

If you examine it properly, your answer and my answer were not the same.

Maybe I should say to you - This is very bad. Dont do such foolish things again.

A little bit childish isn't it?

Love and kisses - MorFF
0
 
LVL 1

Expert Comment

by:sureshkumar
ID: 2568137
(The point of EE is that the 'Experts' help the 'questioners' to solve their problems.  If your answer did not solve the problem in the question, then the questioner has every right to  reject the answer or ask for further clarification. )

you said EE meaning that is right.

In this site we will give some assistance to questnaires.right. we never producing full answers.If we are producing full answers i think then this site address will change to Answers-Exchange.Not Experts-Exchange.


And one more important thing you said there is difference between your answer and my answer when i am observed i found only one difference that is i have not mentioned cell width i said ( now you can adjust widths of cells what ever you like it ). You mentioned cell widths also.

Take light.....................


Love and kisses - sureshkumar
0
 

Author Comment

by:Luby
ID: 2569183
Look carefully now, sureshkumar. These two snippets of code are the different answers to the question. I can see the difference. MorFF obviously can see the difference. Can you see the difference? These two pieces of code each act differently in Netscape 4.x. I can't say what they do in another browser. MorFF addressed the potential dofference between browsers. He, in fact, was the first person to solve my problem.
With regards to your argument about "we never producing full answers". Maybe a different way of thinking is required on your part if you are to be chosen next time as well. While this site is called Experts Exchange, there is no requirement, nor is there much chance, that all of the users be "experts" in ALL the topic areas.
I will be the first to admint that I am no expert in HTML, hence, the question.
After carefully considering all the answers, it was clear to me that the BEST answer WAS chosen.
Regards,
________________________________________
<td>&nbsp;</td>

<td><img SRC="graphic.gif" height=72 width=500></td>

<td>&nbsp;</td>

________________________________________
<td WIDTH=20%>&nbsp</td>

<td WIDTH=60% ALIGN=CENTER><img SRC="graphic.gif" height=72 width=500></td>

<td WIDTH=20%>&nbsp</td>
__________________________________________
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTML form and javascript to send form data in an xml file attached to an email of addresses from a SQL database 21 106
Use Mid in Html 6 35
Two decimal 5 43
Ajax on ASP 2 66
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question