html - Something is moving my drop down nav bar to the right -
when hover on html section html & css nav option moved right reason, how align other nav options.
http://codepen.io/anon/pen/beqprq
#nav { list-style: none; text-align: center; padding: 1.250em 0 1.250em 0; background: #ffffff; font-size: 106.25%; font-family: 'oxygen'; } #nav li { text-decoration: none; text-align: center; color: #fff; } #nav ul li ul.dropdown { background-color: #000000; display: none; position: fixed; z-index: auto; left: 400; vertical-align: left; } #nav ul li:hover ul.dropdown { display: block; } #nav ul li ul.dropdown li { display: block; } #nav > ul > li { display: inline-block; margin-right: 2%; padding: 4.375em 1.250em 4.375em 1.250em; } #nav > ul > li > { text-decoration: none; color: #000000; } #nav > ul > li > a:hover { color: #00c5a2; }
your <ul>
has default styling (padding-left
) has removed. adding
#nav ul li ul.dropdown { padding-left: 0; }
moves text left.
you should check css, vertical-align: left
, left: 400
(doesn't have unit) aren't valid , won't work.
Comments
Post a Comment