473,569 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

resizing td element under mozilla

i want to resize dynamically table cols.
But some strange behaviour occurs under mozilla.
I cannot resize a col smaller than the largest element, even with overflow
hidden and table-layout fixed.
With one exception:
Inserting a initial css table-width like 10px in the html. In this case i
can resize to smaller sizes.
I can live with that (need to calc all td widths, set each and then put the
table to 1px),
but why can't i add this table width dynamically after rendering, to allow
shrinking?
I don't want to modify the html/css, as it comes from an other engine. Just
Javascript DOM.

Does anybody knows a hint, how to resize all tables in the way of the first
example without any hardcoded HTML-CSS.
Allowing shrink to zero under mozilla ?

the example:
*************** *************** *********
<head>
<style>td{ overflow:hidden }</style>

<script>
function mod(ob, siz){
var tab = document.getEle mentById(ob);
tab.style.table Layout = "fixed";
tab.style.width = "1px"; // does not work in mozilla
var tds = tab.getElements ByTagName("TD") ; //just to simplify the example
tds[0].style.width= siz+"px";
tds[0].style.color="r ed";
tds[1].style.width= "50px";
tds[1].style.color="b lue";
}
</script>
</head>
<body>
<br />
first example this way it should be: <a
href='javascrip t:mod("t1",10); '>10px</a>&nbsp;<a
href='javascrip t:mod("t1",200) ;'>200px</a><br />
<table id='t1' style='width:20 px;table-layout:fixed; '
border='1'><tr> <td>massabombas sa</td><td>massabom bassa</td></tr><tr><td>mass
abombassa</td><td>massabom bassa</td></tr></table>

<br />second example only larger works: <a
href='javascrip t:mod("t2",10); '>10px</a>&nbsp;<a
href='javascrip t:mod("t2",200) ;'>200px</a><br />
<table id='t2' style='table-layout:fixed;'
border='1'><tr> <td>massabombas sa</td><td>massabom bassa</td></tr><tr><td>mass
abombassa</td><td>massabom bassa</td></tr></table>

<br />any unknown table: <a href='javascrip t:mod("t3",10); '>10px</a>&nbsp;<a
href='javascrip t:mod("t3",200) ;'>200px</a><br />
<table id='t3'
border='1'><tr> <td>massabombas sa</td><td>massabom bassa</td></tr><tr><td>mass
abombassa</td><td>massabom bassa</td></tr></table>
</body>


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 23 '05 #1
4 2899
andres obrero wrote:
i want to resize dynamically table cols.
But some strange behaviour occurs under mozilla.
I cannot resize a col smaller than the largest element, even with overflow
hidden and table-layout fixed.
[...]
the example:
*************** *************** *********
<head>
<style>td{ overflow:hidden }</style>

<script>
[...]


<http://validator.w3.or g/>
PointedEars
Jul 23 '05 #2
yeah,
very helpful to understand the skills of how to communicate without saying
nothing,
but does not lead to any solution of my problem.
as the validator just want a few headers more.

[[[

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang='de'>
<head>
<title></title>
<style type="text/css" >
td{ overflow:hidden }
</style>

<script type="text/javascript" >

]]]
maybe it helps to read my question a bit more carefully.

"Thomas 'PointedEars' Lahn" <Po*********@nu rfuerspam.de> schrieb im
Newsbeitrag news:41******** ******@PointedE ars.de...
andres obrero wrote:
i want to resize dynamically table cols.
But some strange behaviour occurs under mozilla.
I cannot resize a col smaller than the largest element, even with overflow hidden and table-layout fixed.
[...]
the example:
*************** *************** *********
<head>
<style>td{ overflow:hidden }</style>

<script>
[...]


<http://validator.w3.or g/>
PointedEars



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 23 '05 #3
andres obrero wrote:
very helpful to understand the skills of how to
communicate without saying nothing,
You just did not understand.
but does not lead to any solution of my problem.
as the validator just want a few headers more.
These are not headers, they are markup declarations and attributes
as parts of Valid (X)HTML.
[[[
What is this supposed to mean?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
Unlikely. You are using <br /> which is XHTML Syntax.
[...]
At least this part is Valid now.
]]]
maybe it helps to read my question a bit more carefully.
Maybe it helps to learn what you are using ...
[Top post]


.... and stop that, see the FAQ (for both).
PointedEars
Jul 23 '05 #4
DU
andres obrero wrote:
i want to resize dynamically table cols.
But some strange behaviour occurs under mozilla.
I cannot resize a col smaller than the largest element, even with overflow
hidden and table-layout fixed.
If I was an user, I would expect or even demand that a browser never
collapse cells or columns up to a point that I can not have access to
its content. That expectation should also meets the web author's own
expectation too: let the content be reached, viewed, accessed by the user.
CSS declaration table-layout: fixed have pretty much nothing to do here,
unless you are willing to define width for each column. And in the code
you provided, you did not.
With one exception:
Inserting a initial css table-width like 10px in the html. In this case i
can resize to smaller sizes.
I can live with that (need to calc all td widths, set each and then put the
table to 1px),
but why can't i add this table width dynamically after rendering, to allow
shrinking?
I don't want to modify the html/css, as it comes from an other engine. Just
Javascript DOM.

For someone outside of your webpage design thinking, reasoning, and not
knowing exactly your webpage requirements, analysis, etc.., it's a bit
difficult to follow your line of thinking here.
Does anybody knows a hint, how to resize all tables in the way of the first
example without any hardcoded HTML-CSS.
Allowing shrink to zero under mozilla ?

Again, what you're trying to achieve here goes against normal,
reasonable behavior of a web page.
the example:
*************** *************** *********
<head>
It would be much more preferable, convenient and useful for readers of
your post willing to offer assistance, suggestions, insight if you could
upload your example and provide an url. It would also be quite useful to
make such document with valid/validated markup and css code, you know.
<style>td{ overflow:hidden }</style>

<script>
function mod(ob, siz){
var tab = document.getEle mentById(ob);
tab.style.table Layout = "fixed";
table-layout: fixed is aimed at parsing and rendering a table and such
declaration has requirements, otherwise the table is rendered with the
slow approach. So, here, I think your assignment is pointless.
tab.style.width = "1px"; // does not work in mozilla
Well, how or why should a whole table as wide as 1px would achieve
something?
var tds = tab.getElements ByTagName("TD") ; //just to simplify the example
tds[0].style.width= siz+"px";
tds[0].style.color="r ed";
tds[1].style.width= "50px";


Just forget about browsers here. How should a human (or a genius,
whatever) comply with your table width and cell widths
demands/requirements here? I'm not even asking what you're trying to do
here; I'm asking how could anyone be able to achieve what you are
requesting here. The whole table should be 1px wide but some of its
table cells should be 50px wide.

[snipped code]

If you want meaningful help, assistance, then the best policy to adopt,
to adhere to is to post the most helpful, most meaningful, useful post
you can provide about your webpage situation. If you want respect, be
respectful and be respectable yourself. If you want a friend, act like
one. etc,etc.

Why we won't help you
"(...) Guru Designer replies, telling Newbie Designer that their page
doesn’t validate, and that they should go validate their page before
asking such questions. There is no further discussion; no further
replies are posted; no one else is willing to help.(...)"
http://diveintomark.org/archives/200..._wont_help_you

DU
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
21510
by: delerious | last post by:
I need to determine an element's width and height in pixels (not including padding, border, and margin) in Javascript. The element will not have width or height styles specified. In Mozilla, I know I can use document.defaultView.getComputedStyle() to do this. IE does not support document.defaultView.getComputedStyle(). It supports...
4
15762
by: Kona | last post by:
Hello I've created a style for a div that is set to a specific height. My question is that if the content in this div is larger will it resize to fit the new content? Thank you Kona
86
7700
by: Michael Kalina | last post by:
Because when I asked for comments on my site-design (Remember? My site, your opinion!) some of you told me never to change anything on font-sizes! What do you guys think of that: http://www.clagnut.com/blog/348/ I hope that's going to be a good discussion! Michael
5
2636
by: Robert J. O'Hara | last post by:
For some time I've made use of the max-width property in CSS to cause my pages to appear as a centered block against a contrasting background. This works well in new browsers (Mozilla, etc.) and falls back fine in IE6 and lesser creations. As one who practices "classic" (i.e. dull) typography, this has always been satisfactory since I've...
2
3363
by: z | last post by:
Hi, i just wanted to know how i can resize a table using javascript but in this special manner: I have two tables, one at the top of the page and the other below that one. The problem is that in that code shown below there is a scroll in the window, and what I want is resizing the table t2 from the height of 100% down to the max number of...
6
13342
by: Luke Dalessandro | last post by:
I'm not sure if this is the correct forum for platform specific (Mozilla/Firefox) javascript problems, so just shout and point me to the correct newsgroup if I'm being bad. Here's the deal... html file (generated using .NET 2.0 beta2): <form method="post" action="Test2.aspx" id="form1">
4
2544
by: enceladus311 | last post by:
I've read through a number of links that discuss various methods of resizing a div; however, nothing seems to work correctly for me. The basic idea is that I would like to implement is a panel that can be hidden (to save space), but collapses smoothly, rather than all at once. I've tried setting the div's style.height property. Doing so...
13
4387
by: bgraphics2031 | last post by:
I'm trying to get this iframe to dynamically resize by dragging a vertical bar, but it's not working in Mozilla (It originally worked in IE but I've been trying to port it over). Any help will be appreciated. Here's the resize.js var sResizableElement = "TH"; //Elements to be resized var iResizeThreshold = 8; var iEdgeThreshold = 8; var...
9
5279
by: dli07 | last post by:
Hello, I'm trying to convert a piece of code that creates a dynamic vertical resizing bar in a table from internet explorer to firefox. It's based on a post from http://blogs.crankygoblin.com/blogs/geoff.appleby/pages/50712.aspx. I've also read the post on this topic by bggraphics, but he doesn't arrive at a final result. The main problem I...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.