Click to See Complete Forum and Search --> : horizontal list


sudhakararaog
01-02-2010, 03:36 AM
please refer to this link

http://sudhakargolakaram.co.in/list.html

i have set a background of #555 for the div containing the list and #ccc for each list items, for the last list item about us based on the amount of padding and margin i have applied there is a small gap left over

my question is if i want the last list item to cover the remaining gap, other than creating a class for the last list item and specifying a different value of padding so that the last list item occupied the remaining gap

is there any other way or creating a separate class for the list item is the only way

please advice.

thanks

aj_nsc
01-02-2010, 07:39 AM
With the current supported CSS2 spec, you're right, that's the only way to do it.

When CSS3 becomes mainstream, you can use :last
http://www.w3.org/TR/2009/PR-css3-selectors-20091215/#last-of-type-pseudo

sudhakararaog
01-02-2010, 06:46 PM
thanks