/ Published in: PHP
Inserts "first" and "last" classes to the first and last items respectively. "first" and "last" classes defined in CSS as without padding.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* * Applies pseudo-pseudo classes to inline list items. * Mainly used for autogenerated subnavs. * * @param $the_list String: html code of <li> elements * @param $first Bool: apply style to the first <li> * @param $last Bool: apply style to the last <li> * @return $the_list String: modified html code */ function remove_padding_li ($the_list, $first=FALSE, $last=FALSE) { if ($first) { } if ($last) { } return $the_list; }