On 8/4/12 6:55 AM, sweepslate wrote:
I have a series of unordered lists with thumbnail items that want to
present as one, big list of thumbnails.
In order to do that, I floated the <li> items but not the <ul> ones, so
the area of <ul> kind of 'collapsed' and the different lists 'merged':
http://geocities.ws/sweepslate/float-child-nonfloat-parent/merged.html
If I were to float the <ul>'s then I would end up with something like
this:
http://geocities.ws/sweepslate/float-child-nonfloat-parent/seperate.html
CSS validates but I want to ask if it is considered bad practice to float
the child elements but not the parent one - and if there is any insight
you'd would like to share.
[...]
Well, if you are simply trying to prevent the UL from collapsing, you need
to give the UL a "new block-formatting context." Floating the UL does that.
If you don't want to float the UL there are other properties you can use:
<http://www.yuiblog.com/blog/2010/05/19/css-101-block-formatting-contexts>
Try "overflow: auto;"
None of this has much to do with so-called "best practices" as far as I
know. It's all good. :)
--
Cordially,
David
______________________________________________________________________
css-discuss [[email protected]]
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/