473,605 Members | 2,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

auto size

Hi,
I've got a DIV within another. The parent DIV's size can be expanded
when clicking on a button. When I do that I'd like the child DIV to
expand as well. To do that i set the css property width of the child
DIV to auto as well as its height property.
it works for the width, but not the height, that is the child DIV is
expanded horizontally but not vertically...
Why ?

Jul 5 '06 #1
2 1947
sa************* @googlemail.com wrote:
I've got a DIV within another. The parent DIV's size can be expanded
when clicking on a button. When I do that I'd like the child DIV to
expand as well. To do that i set the css property width of the child
DIV to auto as well as its height property.
it works for the width, but not the height, that is the child DIV is
expanded horizontally but not vertically...
Why ?
width: auto means (approximately) "The space left over in the container
after margins, padding and borders are accounted for".

height: auto means (approximately) "Just tall enough to hold the content".

--
David Dorward <http://blog.dorward.me .uk/ <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 5 '06 #2
To further the education of mankind, sa************* @googlemail.com
vouchsafed:
Hi,
I've got a DIV within another. The parent DIV's size can be expanded
when clicking on a button. When I do that I'd like the child DIV to
expand as well. To do that i set the css property width of the child
DIV to auto as well as its height property.
it works for the width, but not the height, that is the child DIV is
expanded horizontally but not vertically...
Why ?
For height, did you try "inherit"?

--
Neredbojias
Infinity has its limits.
Jul 6 '06 #3

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

Similar topics

1
3182
by: Ellen K. | last post by:
I made a database to hold recordings of calls made to our customers. When I made it I set the size of the primary datafile to 18GB. It's been running flawlessly for over 10 months. A few days ago the users were suddenly no longer able to save the recordings to the database. They got an error message to the effect that the timeout had expired. The failure occurred on the .Execute statement of the Command that calls the stored procedure....
1
13951
by: Glabbeek | last post by:
I'm changing the layout of my site. Instead of using tables, I will use DIVs. It's working fine, except for 1 thing: In IE6 some DIVs are not the correct width. Mozilla and Opera are showing the page the way I want. Does anybody know a solution for this? First of all, the code I am using: CSS ------- body {
5
6094
by: Robert Downes | last post by:
I'm using the following in a page that I'm testing in Mozilla: p.actionLinkBlock {border: 1px #000000 dashed; padding: 0.2cm; width: auto} But the dashed border is extending to the right-edge of the screen. I want it to only extend as far as it needs to to nicely contain the content within (a couple of links). Is width: auto the wrong property to do this? Is Mozilla rendering the style wrong?
2
15898
by: Marek Mänd | last post by:
I have problems with table row height by Internet Explorer6 in xhtml1 css1compat mode document. The table has fixed height and on one TFOOT row the height is set to 'auto' to make it have flexible height, which will shrink if there are more rows in TBODY and which will grow if there are fewer rows in TBODY. However IE6 has huge troubles with this simple concept and doesnt seem want to make the auto-heighted row to behave as auto...
5
1868
by: robin | last post by:
Hi, I've implemented a Style Sheet in Dreamweaver; one of the elements is supposed to stay right with the text flowing around it on the left. A similar tag is supposed to stay left with the text flowing around it to the right. This "Div" container I use to align pictures. Anyway, In Firefox, the container is correctly sized to the aspect ratio and size of the image. However, in IE 6, the image is squashed horizontally and the text...
5
17691
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input type=password maxlength="8" name="password" value="`pss`"> where usr and pss are sent from the previous form.
0
1999
by: Waran | last post by:
I need to create a Auto suggests Textboox like in http://www.google.com/webhp?complete=1&hl=en I have completed this using AJAX.NET for Framework 1.1 . I have some design issues after the data is populated. For me the problem is I am getting more space after the item is selected. And the items are displayed in a combo when i am going for another search / selection without refreshing the page. I am expecting a same output as google's...
4
12519
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0' cellpadding='0' cellspacing='0' style='border-collapse:collapse; width:100%; height:100%;'> <tr><td colspan='2' style='height:3em; border-bottom:1px solid
4
5065
by: obanite | last post by:
Hi! I'm having issues with css in FF and IE regarding overflow: auto and font-size. If I have a div like this: <div style="overflow: auto"> <span>ipsumlorendictowhateveripsumlorendictowhateveripsumlorendictowhateveasdasdripsumlorendictowhateverasdasdasdjasjdioasjiosdjasiojdoasjisdojiasojdo </span> </div>
1
5157
by: pravinnweb | last post by:
can anyone tell me how to set auto height to outer div that is in green box id "gray-background" it should increase relatively to inner div "smbox" here is the css and html code it should work in FF, IE6 and IE7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> Employee Listing </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords"...
0
7934
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8425
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8418
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8288
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6743
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5886
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5445
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1271
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.