Page Widget How to - Center logo with main menu








Question

We would like to know how to center logo with main menu.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
ul {<!--   w  ww  .  jav  a2s .co m-->
  margin: 0;
  padding: 0
}

ul li {
  display: table-cell;
  vertical-align: middle;
  padding: 0 6px;
  border-right: #EEE 1px solid
}
</style>
</head>
<body>
  <ul>
    <li>Menu 1</li>
    <li>Menu 2</li>
    <li>Menu 3</li>
    <li><img src="http://www.java2s.com/style/download.png" /></li>
    <li>Menu 4</li>
    <li>Menu 5</li>
    <li>Menu 6</li>
  </ul>
</body>
</html>

The code above is rendered as follows: