Re: [css-d] Span Style Inside Div with PHP Code
Everything I've research tells me this ought to be valid, but the span style seems to have no effect. div class=registercolright span style=padding-top:20px; ?php // some code that writes an unordered list ? /span /div !-- close registercolright -- vertical padding will not create vertical space on inline elements -- Regards, Thierry www.tjkdesign.com | www.ez-css.org | @thierrykoblentz __ css-discuss [cs...@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] Span Style Inside Div with PHP Code
Many thanks, Thierry. Will settle for additional classes. Bill On 12/3/2010 12:41 PM, Thierry Koblentz wrote: Everything I've research tells me this ought to be valid, but thespan style seems to have no effect. div class=registercolright span style=padding-top:20px; ?php // some code that writes an unordered list ? /span /div !-- close registercolright -- vertical padding will not create vertical space on inline elements -- Regards, Thierry www.tjkdesign.com | www.ez-css.org | @thierrykoblentz __ css-discuss [cs...@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-discuss [cs...@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] Span Style Inside Div with PHP Code
I am using this approach (rather than just change the registercolright class) because each page where that class is used requires some adjustment and I'd prefer, if possible, not to create a large number of similar classes. Then don't Apply multiple classes instead. div class=registercolright lotsOfSpace div class=registercolright littleSpace div class=registercolright oodlesOSpace The point here is that your registercolright class stays the same and gets called everywhere, and then you apply a second class to the div that applies varying amounts of whitespace. You do have lots of very similar classes, (they're all margin-top: something), but they're also very small. ---Tim __ css-discuss [cs...@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] Span Style Inside Div with PHP Code
Hi Bill, Many thanks, Thierry. Will settle for additional classes. Actually, you should not have a list/list items in that span. So rather than adding a class you'd better replace that span with a div (which will take the padding). As a side note, do you need that additional wrapper? Can't you style registercolright with some padding-top? -- Regards, Thierry www.tjkdesign.com | www.ez-css.org | @thierrykoblentz div class=registercolright span style=padding-top:20px; ?php // some code that writes an unordered list ? /span /div !-- close registercolright -- vertical padding will not create vertical space on inline elements -- Regards, Thierry www.tjkdesign.com | www.ez-css.org | @thierrykoblentz __ css-discuss [cs...@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-discuss [cs...@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-discuss [cs...@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] Span Style Inside Div with PHP Code
On 12/3/2010 12:51 PM, Climis, Tim wrote: I am using this approach (rather than just change the registercolright class) because each page where that class is used requires some adjustment and I'd prefer, if possible, not to create a large number of similar classes. Then don't Apply multiple classes instead. div class=registercolright lotsOfSpace div class=registercolright littleSpace div class=registercolright oodlesOSpace The point here is that your registercolright class stays the same and gets called everywhere, and then you apply a second class to the div that applies varying amounts of whitespace. You do have lots of very similar classes, (they're all margin-top: something), but they're also very small. Thanks, Tim. Yes, you are quire right about the proliferation of classes, and I did not know about applying a second class. This has been the result of learn as I go and it seemed easier (at the time) to simply copy a class and make a few adjustment. Your point is well taken and I'll use it in the future. Thank you, Bill __ css-discuss [cs...@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] Span Style Inside Div with PHP Code
On 12/3/2010 12:51 PM, Thierry Koblentz wrote: Hi Bill, Many thanks, Thierry. Will settle for additional classes. Actually, you should not have a list/list items in that span. So rather than adding a class you'd better replace that span with a div (which will take the padding). As a side note, do you need that additional wrapper? Can't you style registercolright with some padding-top? Hi Thierry, Tim's comments apply here, I think. I use registercolright on multiple pages, but the padding requirements of each page vary a little based on the content that is being written by the PHP code. In some cases I want the ul to write near the natural top of the div class=registercolright and on other pages to write farther down from the natural top. Bill __ css-discuss [cs...@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] Span Style Inside Div with PHP Code
Thanks, Tim. Yes, you are quire right about the proliferation of classes, and I did not know about applying a second class. This has been the result of learn as I go and it seemed easier (at the time) to simply copy a class and make a few adjustment. We all learn as we go. Just some of us have been going longer. :) I learned that trick on this very list a few years ago. It's come in handy quite a few times since. Not only can you apply multiple classes to elements, you can also select elements with both classes and apply styles to only things with both. For example: .column {width: 48%} .left {float: left} .left.column { border-right: 1px solid #333; padding-right: 1em; } Note the lack of a space in the last selector. This code will make anything labeled as a column have a 48% width, and anything labeled as left float left. So class=left column will be 48% and floated left. But that last style will also give left columns a bit of white space and a border for a column rule effect. The possibilities are pretty nifty when you get into it. ---Tim __ css-discuss [cs...@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] Span Style Inside Div with PHP Code
Not only can you apply multiple classes to elements, you can also select elements with both classes and apply styles to only things with both. For example: .column {width: 48%} .left {float: left} .left.column { border-right: 1px solid #333; padding-right: 1em; } Note the lack of a space in the last selector. Be aware that this does not work in IE6. This browser sees the above as: .column {width: 48%} .left {float: left} .column { border-right: 1px solid #333; padding-right: 1em; } -- Regards, Thierry www.tjkdesign.com | www.ez-css.org | @thierrykoblentz __ css-discuss [cs...@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/