Home › Forums › Support › Why can't I get a full background colour hover on my font-awesome menu labels?
- This topic has 6 replies, 2 voices, and was last updated 5 years, 10 months ago by Pete.
-
AuthorPosts
-
March 25, 2016 at 5:33 am #181542Pete
main menu, right most menu item
I have 2 different versions of the font awesome menu item that either
display:inline
ordisplay:none
according to @media size. But for the life of me I can’t get the hover to cover the whole item? especially when the left home menu item is fine?March 25, 2016 at 5:40 am #181543PeteOK for some reason it seems the @media css is removing the top and bottom padding of the menu item?
- This reply was modified 8 years, 6 months ago by Pete.
March 25, 2016 at 5:46 am #181546PeteOK, i’ve “fixed” it by adding 14px of padding to those items in the @media css, but I don’t know why it needs this to happen?
March 25, 2016 at 11:13 am #181676TomLead DeveloperLead DeveloperI’m not sure I see what you mean – I even checked your CSS for what you said above and can’t see it.
March 27, 2016 at 4:53 am #182020PeteThis is the css i’m using to get the padding correct for the font awesome menu items… I don’t need this padding css for the other menu items that are not subject to the @media conditional css…
@media only screen and (min-width:415px) and (max-width: 5000px) { li#menu-item-1926.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-1926 a {display:inline;padding:14px 20px 14px 20px;} li#menu-item-1927.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-1927 a {display:none;} } @media only screen and (min-width:320px) and (max-width: 414px) { li#menu-item-1926.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-1926 a{display:none;} li#menu-item-1927.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-1927 a{display:inline;padding:14px 20px 14px 20px;} nav#site-navigation.main-navigation .menu-item-1026 a{font-size:14px;} nav#site-navigation.main-navigation .menu-item-1027 a{font-size:14px;} } @media only screen and (min-width:0px) and (max-width: 320px) { li#menu-item-1926.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-1926 a{display:none;} li#menu-item-1927.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-1927 a{display:inline;padding:14px 10px 14px 10px;} nav#site-navigation.main-navigation .menu-item-1026 a{font-size:15px;padding-left:15px;padding-right:15px;} nav#site-navigation.main-navigation .menu-item-1027 a{font-size:15px;padding-left:15px;padding-right:15px;}
March 27, 2016 at 11:05 am #182053TomLead DeveloperLead DeveloperHmm, not sure why that would be necessary.
How are you adding the icons?
This plugin is pretty awesome: https://en-ca.wordpress.org/plugins/menu-icons/
November 24, 2018 at 5:16 am #737314Peteresolved
-
AuthorPosts
- You must be logged in to reply to this topic.