I have a div#content with many div.item inside it. When using :last-child to create the last div.item without border-bottom , this is OK. But, since content is dynamically added using php and mysql results, I use a conditional pagination table that will be added after the last div.item , which means div#content below. There will be a problem here because CSS :last-child will not recognize the last div.item as last-child. my CSS looks like this:
div#content div.item:last-child { border-bottom: none; }
as you can see, I determine that the last child id is such a div.item
Any suggestions please. thanks in advance.
!!!!! Note that the problem is not that the content is dynamic, but that CSS: last-child does not recognize div.item as the last child, but the last element in the content div #, despite the fact that CSS is :
div#content div.item:last-child
source share