justravis Posted May 18, 2014 Share Posted May 18, 2014 In CSS, most people add most styling to the A tag instead of UL or LI. Do you know why? Link to comment https://forums.phpfreaks.com/topic/288573-css-navigation-menu-styling-ul-vs-li-vs-a-tags/ Share on other sites More sharing options...
fastsol Posted May 18, 2014 Share Posted May 18, 2014 I would say that your statement is highly untrue. For those elements the styling reasons can vary widely depending the end result desired. But one good reason to style the A tag for a menu item is to be able to make the whole button area clickable and not just the menu text it self. Typically you would set the A tag as display: block to achieve this. Link to comment https://forums.phpfreaks.com/topic/288573-css-navigation-menu-styling-ul-vs-li-vs-a-tags/#findComment-1479916 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.