Solved

Trouble with Tables 2 ....

Posted on 2000-02-23
17
163 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

861 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now