Answers

Jul 11, 2006 - 12:49 PM
Hey, dustPuppy...
For the first part of the question - sizing to fit the content like a table cell does, you might find some limited success with setting the width to "auto" such as:
My content here.
But there are times where the best tool for the job is the table. I used to be in the habit of doing table driven layout for my sites but now do all CSS. I still find that a good ol' table is exactly what I need - especially when dealing with creating nice layout for forms on a page. There are some CSS solutions I've seen out there, but they're a bit kludgy.
Now, the second part of your question. I have not found a way for the to programmatically affect the width of a containing the . If the width is set to 100%, it should push out the width of the up to the contraints of any width setting on the . So, if your is set to 100% but your is set to 50%, the 's setting will become the "hard" boundary. If the has a width set to 100% or auto, it should size to its contents, in this case the 100% declaration of the inside of it.
Let me know if this helps...
Ric
For the first part of the question - sizing to fit the content like a table cell does, you might find some limited success with setting the width to "auto" such as:
My content here.
But there are times where the best tool for the job is the table. I used to be in the habit of doing table driven layout for my sites but now do all CSS. I still find that a good ol' table is exactly what I need - especially when dealing with creating nice layout for forms on a page. There are some CSS solutions I've seen out there, but they're a bit kludgy.
Now, the second part of your question. I have not found a way for the to programmatically affect the width of a
Let me know if this helps...
Ric

Jul 11, 2006 - 01:23 PM
Thanks Ric.
You're using width as an example, I was actually interested in the height. should it work the same way?
You're using width as an example, I was actually interested in the height. should it work the same way?

Jul 11, 2006 - 01:59 PM
ewwww....height. That's a moving target, I'm afraid. I have not found a solution that will work cross-browser for setting height, especially when desiring a 100% fill of an area. IE will most of the time allow a to be set to height: 100% and it will fill the parent as expected, but Firefox won't behave the same...it will only size the to be 100% of its contents, not the container. Safari...well, it's Safari, it does whatever it feels like doing, and often with unpredictable results.
There have been some solutions that will take into account the visible height of the browser "viewport" and try to adjust the and based on a pixel specification instead of a percentage. Check out www.quirksmode.org for more information on how/why you may want to set the height in this manner.
This is one of those REALLY big "your mileage may vary" topics...
Good luck!
Answer this question
Please wait...
There have been some solutions that will take into account the visible height of the browser "viewport" and try to adjust the and
This is one of those REALLY big "your mileage may vary" topics...
Good luck!

Jul 11, 2006 - 07:43 PM
hehe, thanks Ric, I was afraid that it was a complicated thing to achieve.
I'll look into the link you provided and post something here if I find something usefull.
Anyway, you get the points for helping me in the right direction.
I'll look into the link you provided and post something here if I find something usefull.
Anyway, you get the points for helping me in the right direction.
Answer this question
Other Questions Needing Answers
About Quomon
Quomon is a network of IT professionals from around the world, collaborating by sharing knowledgeable answers in their specific field of expertise.

Please wait...
Add New Comment