- This topic is empty.
-
AuthorPosts
-
June 23, 2014 at 8:48 am #173476
kenpati
ParticipantHello everyone i have several problems with my menu
http://just-example.url.ph/
1. In a tab (Freebies) i have drop-down menu, in this menu i have lower divider when i am adding some text i want to this is separator (http://just-example.url.ph/images/drop-down-separator.png) take maybe 80% of the total space and (the same width to any elements. Regardless of how much I am adding some text (if this possible please help))2.and second problem add to the tab (Freebies) this image http://just-example.url.ph/images/arrow.png please :D
June 23, 2014 at 8:56 am #173478Paulie_D
MemberCould you please put the demo into a Cdoepen.io example rathe rthan a test page.
It’s really hard to debug and tweak code using Developer Tools
However, both of these can easily be accomplished by pseudo-elements.
June 23, 2014 at 9:01 am #173479kenpati
Participanthere http://codepen.io/anon/pen/qKsoF :)
June 23, 2014 at 9:08 am #173480Paulie_D
MemberThis should fix the first issue
ul.nav ul li { float:none; list-style:none inside; width:100%; text-align:center; height:30px; background-image:url(http://just-example.url.ph/images/drop-down-separator.png); background-repeat: no-repeat; background-position: center bottom; background-size: 80% ; }
June 23, 2014 at 9:14 am #173481Paulie_D
Member…and this should be the other.
ul.nav li.drop-down { background-image: url(http://just-example.url.ph/images/arrow.png); background-size:12px 9px ; background-position: right center; }
June 23, 2014 at 9:15 am #173482kenpati
ParticipantOMG thanks you I actually forgot this (background-size)
June 23, 2014 at 9:17 am #173483Paulie_D
MemberI actually forgot this (background-size)
That’s one reason I generally separate out complex CSS ‘shortcut’ properties into their various parts.
My CSS is a little longer in pre-production but a good minifier will combine them..hopefully.
June 23, 2014 at 9:23 am #173484kenpati
Participantand how about second problem need this arrow.png with separator.png i try ::after but nothing :D
June 23, 2014 at 9:24 am #173485Paulie_D
MemberCheck out my second fiddle
June 23, 2014 at 9:25 am #173486kenpati
Participanti need use double background?
June 23, 2014 at 9:29 am #173487kenpati
Participanti need like this http://just-example.url.ph/arrow.png )
please?)
June 23, 2014 at 10:25 am #173490kenpati
Participantsomebody?)
June 23, 2014 at 10:26 am #173491Paulie_D
MemberYes, a double background would work.
Frankly, I don’t use separator images, there are other options like borders and such.
June 23, 2014 at 10:30 am #173492kenpati
Participantthanks you close topic)
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.