Re: [css-d] Table squirting out of DIV
rollandburn wrote: > Hi everyone, thank-you Zoe for the suggestion to use display: table- > cell to sort out my squir..ahem, overflow problems. :-) Thank you. > Unfortunately > this nullifies the margins I have applied to the div that are > necessary for layout. Applying padding to compensate won't work in > this situation because of background colour issues. > Yes, margin doesn't work very well on table elements -- padding is the way to go. Perhaps you can post the page and we can try to find an alternate solution? You may be able to add another wrapper div that receives the display: table-cell, while the outer one keeps the margins. Can't say more without seeing the page. > I'm not going to revert to using tables and I don't know why. > Good for you. Zoe -- Zoe M. Gillenwater Design Services Manager UNC Highway Safety Research Center http://www.hsrc.unc.edu __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Table squirting out of DIV
Hi everyone, thank-you Zoe for the suggestion to use display: table- cell to sort out my squir..ahem, overflow problems. Unfortunately this nullifies the margins I have applied to the div that are necessary for layout. Applying padding to compensate won't work in this situation because of background colour issues. This is starting to give me a cramp. I didn't realize how much stress is involved with trying to wrap your head around every nuance of css, browser differences, accessibility, usability, appearance, and code efficiency all at the same time. Talk about overwhelming. I'm not going to revert to using tables and I don't know why. =] rollandburn wrote: > I wonder if someone could slap me with some knowledge and tell if > there is a way to keep a table from squirting Eww... please use the word "overflow," as that's the CSS term for it and way less gross than the word "squirt." I shiver just thinking about it... :-) > outside its containing > div when the browser window is resized smaller. Or, How do you get a > div to only shrink to the size of its contents (upon window resize) > and not further? > Set it to display: table-cell, which makes it act like a table cell in that it will expand to fit its contents. IE doesn't understand this, but IE expands to fit anyway (not sure about IE7, though, which still will not support the table display values). You can also simulate expanding to fit by messing with negative margins. I've written a few articles on this over at CMX: http://www.communitymx.com/abstract.cfm?cid=B0029 Zoe -- Zoe M. Gillenwater Design Services Manager UNC Highway Safety Research Center http://www.hsrc.unc.edu __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Table squirting out of DIV
rollandburn wrote: > I wonder if someone could slap me with some knowledge and tell if > there is a way to keep a table from squirting Eww... please use the word "overflow," as that's the CSS term for it and way less gross than the word "squirt." I shiver just thinking about it... :-) > outside its containing > div when the browser window is resized smaller. Or, How do you get a > div to only shrink to the size of its contents (upon window resize) > and not further? > Set it to display: table-cell, which makes it act like a table cell in that it will expand to fit its contents. IE doesn't understand this, but IE expands to fit anyway (not sure about IE7, though, which still will not support the table display values). You can also simulate expanding to fit by messing with negative margins. I've written a few articles on this over at CMX: http://www.communitymx.com/abstract.cfm?cid=B0029 Zoe -- Zoe M. Gillenwater Design Services Manager UNC Highway Safety Research Center http://www.hsrc.unc.edu __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
[css-d] Table squirting out of DIV
Hi everyone, I wonder if someone could slap me with some knowledge and tell if there is a way to keep a table from squirting outside its containing div when the browser window is resized smaller. Or, How do you get a div to only shrink to the size of its contents (upon window resize) and not further? - |containing div at 95% page width | | | | | | | variable width table | | | squirting out | | | | | || || - Thanks again! __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/