[css-d] Expand width of block level element to fit contents
Is it possible in CSS to have a block level element that will expand its width to fit its contents? I have a block level element (a form) containing select fields, the values of which are drawn from a database. Therefore, the width of these select fields will be unknown, so I need the form width to be flexible and to expand if need be. I have read about using inline-block for the display property, which from initial tests seems to do the job. However, is this the best way to go, or would you suggest another way? Thanks, Stephen __ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
[css-d] Expand parent width to contain floated elements
Hi is there a way to expand the width of a parent container so that it fits the contents of the floated elements within it? If I have two floated elements within a parent element, and the width of those two floated elements can change depending on their content, I would like the width of the parent element to expand to contain them. At the moment, the floated element would stick out the right of the container. Thanks. __ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Floats Vs Absolute positioning
What about using relative positioning? How does that fit in to this argument? Thanks, Stephen - Original Message - From: Gunlaug Sørtun [EMAIL PROTECTED] Sent: Friday, May 19, 2006 11:59 AM Eoin Maguire wrote: [...] I am not happy with using positioning instead of floats, but now that I think about it I amn't sure *why* exactly I have a preference for floating as a layout method. Anyone got good reasons for using one over the other or have I just picked up an irrational dislike for positioned layouts? I think we have rational reasons for preferring floats for main parts of layouts :-) short list Scaling and footers - font-resizing and/or changing amount of content across multiple columns: - we can clear scaling 'floats'. - we can't clear scaling 'a.p.'. Fluid page-width and varying window-width: - 'floats' can auto-linearize (those float-drops that some don't like) - 'a.p.' can't auto-linearize. Element-overlapping: - other elements do interact with 'floats', so overlapping can be prevented. - other elements don't interact with 'a.p.', so overlapping can't be prevented. /short list Personal experience: It is very easy to apply 'absolute positioning', but it's very hard to make layouts with any degree of complexity work well with 'a.p.'. It is sometimes hard to apply 'float-methods' for layouts with any degree of complexity, but once 'floats' work they tend to work well. __ 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] Persistant and preferred stylesheet
Is it possible to use both a persistent and a preferred stylesheet, if I specify both in my code? Thanks, Stephen __ 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] text alignment in footer div
What would be wrong with using a table in this instance? It achieves everything that is required without any hacks, like what Francky posted, and will validate? Stephen - Original Message - From: Helen [EMAIL PROTECTED] Sent: Friday, May 05, 2006 6:22 PM At the following location: http://www.picturethis4u.com/k-test.htm , I want to position the text New Clients Welcome to the left, and the text link: Enquire Here by E-mail to the right in this footer div. __ 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] Variable background image size
I am trying to have a left column with a different colour that resizes when the font size is resized. I saw this technique a while ago but I can't remember exactly how it works - where basically you have a background image that is larger than what your window will ever be usually, and you use background-position and ems (and/or percentages) to position the background column. When the font size is resized, the column will resize accordingly because of the background positioning setting. Is anyone familiar with this technique and can they remind me how it works? Thanks, Stephen __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Simple two columns
Lol yeah I still believe in using tables at times for layout, so much more reliable and simple and does what you expect and you don't need workarounds. Stephen - Original Message - From: Rob Agar [EMAIL PROTECTED] Sent: Tuesday, August 30, 2005 2:29 AM How do I stop col2 wrapping below col1 however when the browser window is shrunk down in size? (Has to work in IE). table cellspacing=0 tr td class=col1.../td td class=col2.../td /tr /table OK, I'm a green + knobbly troll. But it would work, and it's simple... -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.17/84 - Release Date: 29/08/2005 __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Simple two columns
Rob, to be honest, that is the solution I have gone for after much messing about trying various suggested solutions. Trying to do simple columns in css is just too complicated (perhaps why there are oodles of pages on the net about finding perfect column solutions). The table solution is so much more reliable, robust, doesn't break, and does what it says on the tin. You don't have to worry about clearing problems either (which I was having because I had floated both columns but I also had a left floated navigation div to the left of that) or wrapping problems. Someone remind me what is wrong with doing this? I mean, floating divs to make columns is not actually what they are meant for anyway is it? In which case we are using them for the wrong purpose, which is exactly what the criticism of tables is. Apologies if this comes over as a rant or upsets anyone. I am still using floated divs for design don't worry, but I think that there are times when tables for layout is still the best way to go. Stephen - Original Message - From: Rob Agar [EMAIL PROTECTED] To: 'CSS Discuss' css-d@lists.css-discuss.org Sent: Tuesday, August 30, 2005 2:29 AM Subject: RE: [css-d] Simple two columns How do I stop col2 wrapping below col1 however when the browser window is shrunk down in size? (Has to work in IE). table cellspacing=0 tr td class=col1.../td td class=col2.../td /tr /table OK, I'm a green + knobbly troll. But it would work, and it's simple... Rob -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.17/84 - Release Date: 29/08/2005 __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
[css-d] Simple two columns
How do I go about making two simple columns to sit side by side to each other using CSS? This is not for the page layout as such, but just for 2 paragraphs of text to sit next to each other with the same width, which will vary according to the width of the page. div class=col1Paragraph 1/div div class=col2Paragraph 2/div Stephen -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.16/83 - Release Date: 26/08/2005 __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Re: meyer's pure css popups
But what if he starts lecturing in your garage? http://www.flickr.com/photos/merlin/13374753/ haha simply hillarious. This comment wins it for me: jayallen says: Fast forward to 2005. How has the web advanced? br / That, my friends, is progress. Lol! -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.10 - Release Date: 13/05/2005 __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/