osx - CSS text alignment with Mac browsers -
i've created css top bar menu uses | character separators. it's rendering should on browser try linux or windows. but, on mac, browser, | characters drop down line or so, , render below menu bar.
css
#menu { position:relative; width:80%; min-width:800px; margin-left:auto; margin-right:auto; margin-top:1%; text-align:center; border-top:1px solid #666666; border-bottom:1px solid #666666; padding: 12px 12px; height:1.6em; font-family: 'geometria-medium'; } #menu ul { display:inline-block; margin: 0; margin-left:auto; margin-right:auto; text-align:left; padding: 0px; line-height: 1.2em; } #menu li { list-style:none; } #menu>ul>li { float: left; margin-right: 1px; position:relative; } #menu>ul>li ul { position:absolute; } #menu>ul>li ul>li { bottom:0px; display:none; width:15em; float:left; } #menu>ul>li:hover ul>li { display:block } #menu { display:block; padding: 0px 5%; text-decoration: none; text-transform: uppercase; color:#666666; line-height:2em; } #menu a:hover { text-decoration: none; cursor:pointer; } #menu .active { } #sub { background-color:#cc0000; line-height:2em; } #sub a:hover { background-color:#ff9999; }
html
<div id="menu"> <ul class="nav"> <li class="navli" style="vertical-align: top !important;"><a href="index.html">home <span style="vertical-align: top !important;"> |</span></a></li> <li class="navli"><a href="about.html">about <span style="vertical-align: top !important;"> |</span></a></li> <li class="navli"><a href="services.html">services <span style="vertical-align: top !important;"> |</span></a></li> <li class="navli"><a href="#">portfolio <span style="vertical-align: top !important;"> |</span></a> <ul id="sub"> <li><a href="sparkle.html" style="color:#ffffff;line-height:2em;border-bottom:2px solid #ff9999;">the sparkle project</a></li> <li><a href="jam.html" style="color:#ffffff;line-height:2em;border-bottom:2px solid #ff9999;">jam in jubilee</a></li> <li><a href="connect.html" style="color:#ffffff;line-height:2em;border-bottom:2px solid #ff9999;">connect network</a></li> <li><a href="ovi.html" style="color:#ffffff;line-height:2em;border-bottom:2px solid #ff9999;">ovidiu bistriceanu</a></li> <li><a href="devon.html" style="color:#ffffff;line-height:2em;">the devon clifford music foundation</a></li> </ul> </li> <li class="navli"><a href="testimonials.html">testimonials <span style="vertical-align: top !important;"> |</span></a></li> <li class="navli"><a href="blog.html">blog <span style="vertical-align: top !important;"> |</span></a></li> <li class="navli"><a href="contact.html">contact</a></li> </ul> </div>
any appreciated. thanks
if me..
i'd put css in css file, not inline. i'd use css visual appearances, below..
#menu>ul>li{ border-right: 1px solid #000; padding-right:20px; padding-left: 10px; } #menu>ul>li:last-child { border-right:none; padding: none; }
...
<div id="menu"> <ul class="nav"> <li class="navli"><a href="index.html">home</a></li> <li class="navli"><a href="about.html">about</a></li> <li class="navli"><a href="services.html">services</a></li> <li class="navli"><a href="#">portfolio</a>
Comments
Post a Comment