Horizontal scrolling

O

ofiras

Hi everyone,
I made a table in html, and I wrote in the left <td> width = 300, in
the middle <td>, width=70% and in the right <td>, width = 300, but
they all squeeze when the middle <td> has to get bigger to contain all
context. It's like the page don't want to be scrolled horizontally.
How can I make my <td>'s stay in the width I stated no matter what,
even if the page will have to have horizontal scrolling?
Please help,
Ofir.
 
D

dorayme

ofiras said:
Hi everyone,
I made a table in html, and I wrote in the left <td> width = 300, in
the middle <td>, width=70% and in the right <td>, width = 300, but
they all squeeze when the middle <td> has to get bigger to contain all
context. It's like the page don't want to be scrolled horizontally.
How can I make my <td>'s stay in the width I stated no matter what,
even if the page will have to have horizontal scrolling?
Please help,

You want three cells in a row with the outside ones at 300px and the
middle one to take up 70% of something. 70% of the whole table, let's
say. OK. But what is the table width so that the poor browser can
calculate what to make the middle cell?

Let's just imagine you set 100% for the width of the table itself,
meaning, roughly, 100% of the browser window's width, whatever it
happens to be.

<http://dorayme.890m.com/alt/squabblingCells.html>

If the browser window happened to be 2000px wide, since 70% of 2000 is
1400px, there is 600 left. The side cells would be happy. Under 2000,
they would fight over what is left if the browser gives the middl cell
priority. Over 2000, it is cream on the cake for hungry side cells but
maybe not for the author.

This might do you:

<http://dorayme.890m.com/alt/happyCellsButMiserableUser.html>
 
O

ofiras

You want three cells in a row with the outside ones at 300px and the
middle one to take up 70% of something. 70% of the whole table, let's
say. OK. But what is the table width so that the poor browser can
calculate what to make the middle cell?

Let's just imagine you set 100% for the width of the table itself,
meaning, roughly, 100% of the browser window's width, whatever it
happens to be.  

<http://dorayme.890m.com/alt/squabblingCells.html>

If the browser window happened to be 2000px wide, since 70% of 2000 is
1400px, there is 600 left. The side cells would be happy. Under 2000,
they would fight over what is left if the browser gives the middl cell
priority. Over 2000, it is cream on the cake for hungry side cells but
maybe not for the author.

This might do you:

<http://dorayme.890m.com/alt/happyCellsButMiserableUser.html>

Thanks, I didn't get exactly what I want, but I guess I'll use it,
it's ok for what I want to do.
Ofir.
 
O

ofiras

Thanks, I didn't get exactly what I want, but I guess I'll use it,
it's ok for what I want to do.
Ofir.

Apparently it's not ok... I set the width of the table to 1500, and
gave the cells the widths - 300,900,300. Still, when the context of
the middle cell is getting out of the cell's width, the other cells
squeeze. How can I make my table to be at the width of the combined
width of the cells?
Please help,
Ofir.
 
M

+mrcakey

Thanks, I didn't get exactly what I want, but I guess I'll use it,
it's ok for what I want to do.
Ofir.

-Apparently it's not ok... I set the width of the table to 1500, and
-gave the cells the widths - 300,900,300. Still, when the context of
-the middle cell is getting out of the cell's width, the other cells
-squeeze. How can I make my table to be at the width of the combined
-width of the cells?
-Please help,
-Ofir.

It would be most helpful if you gave us a link and then we could see exactly
what you were doing.

+mrcakey
 
D

dorayme

ofiras said:
Apparently it's not ok... I set the width of the table to 1500, and
gave the cells the widths - 300,900,300. Still, when the context of
the middle cell is getting out of the cell's width, the other cells
squeeze. How can I make my table to be at the width of the combined
width of the cells?
Please help,
Ofir.

In Safari 3, FF 2, iCab, you get what you want, I guess with:

<http://dorayme.890m.com/alt/setPxWidthTable.html>

but not with Opera. Opera, at least my Opera, gives 300px to the left
cell and 300px to the right cell but makes up its own mind about the
middle one, ignoring the 1500px spec for the table. Opera shows some
gumption!

Specifying the 70% for the middle as well to give some sort of
unmistakable message is a disastrous complication.

What really are you trying to do? Please tell us the real purpose, the
sort of webpage it is about etc, a URL would be good and this way we
might suggest how best to tackle the issue you face so it is happy in
almost all browsers. Making these particular conditions is just giving
us things to have fun with... <g>
 
O

ofiras

In Safari 3, FF 2, iCab, you get what you want, I guess with:

<http://dorayme.890m.com/alt/setPxWidthTable.html>

but not with Opera. Opera, at least my Opera, gives 300px to the left
cell and 300px to the right cell but makes up its own mind about the
middle one, ignoring the 1500px spec for the table. Opera shows some
gumption!

Specifying the 70% for the middle as well to give some sort of
unmistakable message is a disastrous complication.

What really are you trying to do? Please tell us the real purpose, the
sort of webpage it is about etc, a URL would be good and this way we
might suggest how best to tackle the issue you face so it is happy in
almost all browsers. Making these particular conditions is just giving
us things to have fun with... <g>

Ok, this is the html as it is when everything is ok:
http://testweb101.awardspace.com/index1.html
This is what I don't want to happen: http://testweb101.awardspace.com/index2.html
In the second one the side td's are squeezed. I want them to stay in
the same width I stated which is 300.
 
O

ofiras

The div which wraps the (entire) contents of the middle cell should have -

style="width:900px;overflow:hidden;"

but I still won't to see the hole word, I want the cells to be at
least the width I wrote, unless there is something like the ling word
I wrote, and then the cell gets bigger, while the other cells stay the
same - I won't the table width to be the combined width of all cells
(the real width that we see - if one cell is bigger, then the table
need to get bigger at the same amount of pixels the cell got big.)
 
D

dorayme

‭<‬1583a697-52ec-401d-a439-117212e4524a@c65g2000hsa.googlegroups.com‭>,‬

‭> ‬but I still won't to see the hole word‭, ‬I want the cells to be at
‭> ‬least the width I wrote‭, ‬unless there is something like the ling word
‭> ‬I wrote‭, ‬and then the cell gets bigger‭, ‬while the other cells stay the
‭> ‬same‭ - ‬I won't the table width to be the combined width of all cells
‭> (‬the real width that we see‭ - ‬if one cell is bigger‭, ‬then the table
‭> ‬need to get bigger at the same amount of pixels the cell got big‭.)‬

What width do you want the table to be‭? ‬Please supply a pixel amount or‭ ‬
a percentage amount‭. (‬to keep it simple‭). ‬If you supply a‭ % ‬remember‭ ‬
that it is the percent of the container inwhich the table is in‭. ‬If the‭ ‬
table is loose in body and body fill the window width‭, ‬then it is a‭ ‬
percent of the browser window‭.‬

Next‭, ‬you want 3‭ ‬cells‭. ‬You want the first cell to be 300px and the last‭ ‬
to be 300px‭. ‬What do you want the middle cell to be‭? ‬I explained in my‭ ‬
first post with URL illustration why there is a difficulty‭. ‬So what do‭ ‬
you want‭?‬

‭-- ‬
dorayme
 
O

ofiras

‭<‬1583a697-52ec-401d-a439-117212e45...@c65g2000hsa.googlegroups.com‭>,‬

‭> ‬but I still won't to see the hole word‭, ‬I want the cells to be at
‭> ‬least the width I wrote‭, ‬unless there is something like the ling word
‭> ‬I wrote‭, ‬and then the cell gets bigger‭, ‬while the other cells stay the
‭> ‬same‭ - ‬I won't the table width to be the combined width of all cells
‭> (‬the real width that we see‭ - ‬if one cell is bigger‭, ‬then the table
‭> ‬need to get bigger at the same amount of pixels the cell got big‭.)‬

What width do you want the table to be‭? ‬Please supply a pixel amount or‭ ‬
a percentage amount‭. (‬to keep it simple‭). ‬If you supply a‭ % ‬remember‭ ‬
that it is the percent of the container inwhich the table is in‭. ‬If the‭ ‬
table is loose in body and body fill the window width‭, ‬then it is a‭ ‬
percent of the browser window‭.‬

Next‭, ‬you want 3‭ ‬cells‭. ‬You want the first cell to be 300px and the last‭ ‬
to be 300px‭. ‬What do you want the middle cell to be‭? ‬I explained in my‭ ‬
first post with URL illustration why there is a difficulty‭. ‬So what do‭ ‬
you want‭?‬

‭-- ‬
dorayme

As I said, I want my table's width to be the combined width of the
cells containing it, and the middle cell's width will be 700px, that
means that when there are no problems, the table width will be 1300px
(300+700+300). When there is a problem like in the second URL I posted
(http://testweb101.awardspace.com/index2.html ), and the one of the
cell's width has to get bigger (a thing that I want to happen), the
others squeeze, trying to fit into the 1300px I assigned to the table
- a thing that I don't want to happen. I want the table to be
"elastic" and if one cell gets bigger, that the other cells can stay
the same, while the whole table's width is getting bigger to contain
all the cells.
For example, in a normal situation, like in the first URL I posted
(http://testweb101.awardspace.com/index1.html) the cells width is as I
wanted them to be (300,700,300), and the table's width is their
combined width, as I stated (1300).
when the middle cell get's bigger for example, let's say to the width
of 900px, that the other cells squeeze to the width of the biggest
word in them, trying to fit the 1300px of the table's width. what I
want to happen in this situation, is that the width of the left and
right cells will stay the same, while the middle's width will be 900,
and that means that the table's width will grow too to 1500px
(300+900+300).
I don't mind using java script if necessary, but I prefer not.
Please help,
Ofir.
 
D

dorayme

‭<‬b934da7f-d018-46db-9e1c-40960eb68e59@c58g2000hsc.googlegroups.com‭>,‬

‭> > ‬In article‭ ‬
‭> > <‬1583a697-52ec-401d-a439-117212e45‭...‬@c65g2000hsa.googlegroups.com‭>,‬
‭> ‬‮>‬
‭> > > ‬but I still won't to see the hole word‭, ‬I want the cells to be at
‭> > > ‬least the width I wrote‭, ‬unless there is something like the ling word
‭> > > ‬I wrote‭, ‬and then the cell gets bigger‭, ‬while the other cells stay the
‭> > > ‬same‭ - ‬I won't the table width to be the combined width of all cells
‭> > > (‬the real width that we see‭ - ‬if one cell is bigger‭, ‬then the table
‭> > > ‬need to get bigger at the same amount of pixels the cell got big‭.)‬
‭> ‬‮>‬
‭> > ‬What width do you want the table to be‭? ‬Please supply a pixel amount or‭ ‬
‭> > ‬a percentage amount‭. (‬to keep it simple‭). ‬If you supply a‭ % ‬remember‭ ‬
‭> > ‬that it is the percent of the container inwhich the table is in‭. ‬If the‭ ‬
‭> > ‬table is loose in body and body fill the window width‭, ‬then it is a‭ ‬
‭> > ‬percent of the browser window‭.‬
‭> ‬‮>‬
‭> > ‬Next‭, ‬you want 3‭ ‬cells‭. ‬You want the first cell to be 300px and the last‭ ‬
‭> > ‬to be 300px‭. ‬What do you want the middle cell to be‭? ‬I explained in my‭ ‬
‭> > ‬first post with URL illustration why there is a difficulty‭. ‬So what do‭ ‬
‭> > ‬you want‭?‬
‭> ‬‮>‬
‭> > -- ‬
‭> > ‬dorayme
‭> ‬
‭> ‬As I said‭, ‬I want my table's width to be the combined width of the
‭> ‬cells containing it‭, ‬

They can't be much else‭ (‬if we take away borders and padding and‭ ‬
margins‭) ‬can they‭?‬

‭> ‬and the middle cell's width will be 700px‭, ‬that
‭> ‬means that when there are no problems‭, ‬the table width will be 1300px
‭> (‬300+700+300‭). ‬

OK‭, ‬you want 1300px wide table‭, ‬with 300‭, ‬700‭ ‬and 300‭. ‬Cannot you simply‭ ‬
adapt the table I‭ ‬have already made for you‭? ‬I made you‭:‬

‭<‬http‭://‬dorayme.890m.com/alt/setPxWidthTable.html‭>‬

and mentioned caveats‭.‬

Can you not adapt the figures‭?‬

Have you tried changing my 1500‭ ‬to 1300‭? ‬That gives you what you want in‭ ‬
Firefox and Safari‭, ‬a couple of good modern browsers‭. ‬You get the‭ ‬
figures you want and the scrollbar you wanted‭. ‬

I don't know about other browsers‭. ‬I know Opera will not let you dictate‭ ‬
to it for the middle cell so easily‭. ‬Why not tell us what happens in‭ ‬
other browsers‭. ‬

‭ ‬I can make neither head nor tail of your URLs‭, ‬they simply look like‭ ‬
nothing anyone could want‭? ‬Perhaps you are seeing something I am not‭ ‬
seeing‭? ‬

‭> ‬When there is a problem like in the second URL I posted
‭> (‬http‭://‬testweb101‭.‬awardspace.com/index2‭.‬html‭ ), ‬and the one of the
‭> ‬cell's width has to get bigger‭ (‬a thing that I want to happen‭), ‬the
‭> ‬others squeeze‭, ‬trying to fit into the 1300px I assigned to the table
‭> - ‬a thing that I don't want to happen‭. ‬I want the table to be
‭> "‬elastic‭" ‬and if one cell gets bigger‭, ‬that the other cells can stay
‭> ‬the same‭, ‬while the whole table's width is getting bigger to contain
‭> ‬all the cells‭.‬
‭> ‬For example‭, ‬in a normal situation‭, ‬like in the first URL I posted
‭> (‬http‭://‬testweb101‭.‬awardspace.com/index1‭.‬html‭) ‬the cells width is as I
‭> ‬wanted them to be‭ (‬300,700,300‭), ‬and the table's width is their
‭> ‬combined width‭, ‬as I stated‭ (‬1300‭).‬
‭> ‬when the middle cell get's bigger for example‭, ‬let's say to the width
‭> ‬of 900px‭, ‬that the other cells squeeze to the width of the biggest
‭> ‬word in them‭, ‬trying to fit the 1300px of the table's width‭. ‬what I
‭> ‬want to happen in this situation‭, ‬is that the width of the left and
‭> ‬right cells will stay the same‭, ‬while the middle's width will be 900‭,‬
‭> ‬and that means that the table's width will grow too to 1500px
‭> ‬‮(‬300+900+300‮).‬


Well‭, ‬now you want something else‭, ‬more fluid‭. ‬I did give you another‭ ‬
URL that held the sides at 300‭ ‬and let the middle find itself‭. (‬I think‭)‬

Anyway‭, ‬good luck‭, ‬I am not sure what else I can do‭?‬

‭-- ‬
dorayme
 
N

Neredbojias

but I still won't to see the hole word, I want the cells to be at
least the width I wrote, unless there is something like the ling word
I wrote, and then the cell gets bigger, while the other cells stay the
same - I won't the table width to be the combined width of all cells
(the real width that we see - if one cell is bigger, then the table
need to get bigger at the same amount of pixels the cell got big.)

How come the newest 4-5 messages in this thread have garbled characters?

Anyway, what you want to do is pathetically simple but you've confused it
with all the crap you have in your so-called page. You should have made a
simple one-row, three-cell, no-nested tables example and you probably could
have figured it out for yourself.

First, get rid of all the widths (-except the redoubtable "spacer cells"
which you should get rid of entirely.) Now put a 300px-wide div around the
contents of the first and last cell. Voila, your done. If you want the
middle cell different than its default, go ahead and put a width on it or
on a contents-containing div inside. DON'T put a width on the table. The
end cells will stay at 300px.
 
D

dorayme

ofiras said:
The table you made still makes the other cells squeese when one cell
gets big - http://testweb101.awardspace.com/index3.html

That's because you have put an unbreakable string of text in the middle
cell.

I did ask you, and others have asked you what you are really doing? What
is this page for? Is it a big picture i the middle or really some huge
word that is unique or is it for some scientific purpose like a string
for chemical components or what? What is an example of the real content?
Nobody wants "worddddd..." with hundreds of "d"s?
 
O

ofiras

How come the newest 4-5 messages in this thread have garbled characters?

Anyway, what you want to do is pathetically simple but you've confused it
with all the crap you have in your so-called page.  You should have made a
simple one-row, three-cell, no-nested tables example and you probably could
have figured it out for yourself.

First, get rid of all the widths (-except the redoubtable "spacer cells"
which you should get rid of entirely.)  Now put a 300px-wide div around the
contents of the first and last cell.  Voila, your done.  If you want the
middle cell different than its default, go ahead and put a width on it or
on a contents-containing div inside.  DON'T put a width on the table..  The
end cells will stay at 300px.

Thanks, I seceded doing what I want using what you said. I'm sorry for
my English and my lousy explanation of what I want, English is not my
mother tongue, so it's hard for me to use it. I knew it was just a
matter of explaining what I want, and that the solution is not that
complicated...
Anyway, thank you all for helping me.
Ofir.
 
N

Neredbojias

Thanks, I seceded doing what I want using what you said. I'm sorry for
my English and my lousy explanation of what I want, English is not my
mother tongue, so it's hard for me to use it. I knew it was just a
matter of explaining what I want, and that the solution is not that
complicated...
Anyway, thank you all for helping me.
Ofir.

You speak English much better than I speak any other language.

Anyway, it would benefit you to research the current html standards
because the page you presented is basically constructed with 10-year-old
methods.

Nonetheless, best of luck on your venture.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top