- This topic is empty.
-
AuthorPosts
-
August 20, 2013 at 4:23 am #147514
dagash
Participanti am trying to make my navbar links move up ( by using margin-top ) but its not working ,,
<div class="aa"> <!-- <div class="icon"></div> --> <a href="#" class="link"><span class="icon-youtube"></span>category</a> </div>
and the css is here :
body { background : #cd8fa0; } .aa{ margin-top: 50px; background : #f9f9f9; transition : all 0.4s linear; width :80px; height : 80px; } .icon{ background-image : url('images/alert.png'); width: 48px; height: 48px; } a{ text-decoration : none; font-size : 14px; transition : all 0.4s linear; } .aa a:hover { margin-top : 30px; transform : scale(1.05); } span { dispaly : block; font-size : 14px; } .link:hover span { color : red; }
i am trying to make same as it is in this website ( social links icons ):
http://blog.omariemran.com/note : for this class ( icon-youtube ) , i am using Awesome-font icon library .
August 20, 2013 at 4:36 am #147515Paulie_D
MemberPerhaps you could make a Codepen as I don’t think we have enough information.
August 20, 2013 at 5:55 am #147521Paulie_D
MemberPretty sure that’s not what he’s looking for.
As I understand it, his links/list items aren’t moving on hover as he expects.
August 20, 2013 at 8:08 am #147573Nishant
ParticipantIf i am getting right what you want to do then change
.aa a:hover
to.aa:hover
in your css.take a look here….. http://codepen.io/maxwbailey/pen/rbKzy
August 20, 2013 at 8:37 am #147575Paulie_D
MemberWe don’t KNOW what the actual issue is until we see a live example (either a link or a Codepen).
Otherwise we’re offering solutions in the dark.
August 20, 2013 at 10:37 am #147590Nishant
ParticipantI think he just want a ‘move up’ hover effect to nav.
August 20, 2013 at 10:59 am #147594Paulie_D
MemberThat’s obvious but without knowing the full structure we don’t know the best solution. It might be one of the above answers but it might be something else.
August 20, 2013 at 1:50 pm #147624dagash
Participantsoey for being late … it was a hard day ,,,
thank you for your respondse guys ,,, i will try thoose solution and ill come back ..August 20, 2013 at 1:52 pm #147625dagash
ParticipantNishant
that is what i need , thank you guys…August 20, 2013 at 1:58 pm #147626noahgelman
ParticipantRemove your current styles that are trying to move the link and add:
a { position:relative; /* This will let us change where the link is displayed visually without affecting the rest of the dom */ } a:hover { top:-2px; /* This value is the px length and direction you wish to move the link */ }
August 21, 2013 at 3:44 am #147671dagash
Participanthttp://codepen.io/anon/pen/pGrLI
please guys check this ,, also not working …
August 21, 2013 at 4:26 am #147680Paulie_D
MemberTrick is to put as much styling on the anchor rather than the li if you want.
You can move some on to the li if you want but you would have to add a hover state to the li too.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.