473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Adjusting Div's Width

Hello,
I use a floating div with overflow:auto properties for specific reason
(to avoid the bug of overlapping elements). Anyway, the problem is
that this div has 2 tables inside. In some rare cases, tables may have
larger width than my floating div, which is the container for these
tables, and therefore, scrollbars appear.
I need to remove scrollbars, so I created function to get each tables
cllientWidth values and if any table is larger than its container,
apply the same width to the container too or floating div as I called
it.
The problem begins with browser's incompatibility. Sometimes, it still
does not work right. So I figured this is not the best solution.
Could you please recommend a better solution if it occurs to you? I'd
really appreciate your suggestions.
Thanks.

Jul 18 '07 #1
1 1558
vunet...@gmail.com wrote:
[snip]
>
offsetWidth may be working better but it still is not a solution. The
result is the same. I thought of applying width:auto to expand width
automatically and then measure that new width and make it fixed. But
then the width could have become terribly wide.
Why don't you post your code? width:auto is clearly not the answer in
a scrolling container (not to mention IE doesn't like it.) Post your
tags and code and perhaps somebody can help you. Everything is a shot
in the dark at this point and I suspect you are trying to solve the
wrong problem anyway.

Jul 20 '07 #2

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

Similar topics

2
by: tpaulson | last post by:
I have a couple of DIV's that I hide/display based on radio buttons. On the DIV's, I have multiple drop down boxes. The source shows that they are populated, but I can't make them drop down. Only...
10
by: Luke | last post by:
Hi. I am trying to make correct layout, here is an example of (dynamically generated content via jsp): http://localhost/www/layout.htm Most outer div is positioned absolute (if not then it...
11
by: asllearner | last post by:
I am trying to create two rows, each 100% wide. the first has three dvis, the first is 20% wide, the second is 60% wide, the third is 20% wide. THe second row is the same except the first element...
14
by: mistral | last post by:
Below is Typewriter Scroller script. I want adjust is as follows: remove lower dash "_" out; display text not in form, but inside div, without any borders (style="visibility:hidden"). Also I need...
1
by: MissMarie | last post by:
I've been playing around with DIV tables in myspace to better learn how to rewrite my own code for my business site without having to pay someone to design it. I've tried embedding a slideshow into...
1
by: vunet.us | last post by:
Hello, I use a floating div with overflow:auto properties for specific reason (to avoid the bug of overlapping elements https://bugzilla.mozilla.org/attachment.cgi?id=125003). Anyway, the problem...
2
by: tonsi | last post by:
I have a page but it wont center the div. Can anyone take a look at it and help. When I try to center in the body using text-align: center; it doesn't work with the main container (called Table_01)....
3
div
by: shalini166 | last post by:
how to change the height and width of the div command during runtime. because i include datagrid in it. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="supp.aspx.cs" Inherits="temp" %> ...
14
by: issentia | last post by:
I'm working on this site: http://www.essenceofsoy.com/redesign/index2.html and I'm having a few problems with getting the layout exactly right. 1) When the menu items are rolled over, they...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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,...

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.