Single-level CSS Menus / Posts /

Horizontal menu does not center for IE8

21
(sorry for the wrong link in the former thread)

Try this:
http://www.dirkstelder.nl/header.htm

The menu is centered with Firefox, Chrome, Ipad and newer IE but IE8 shows the menu left aligned!! There must be a simple fix for that??

thanks for any suggestions
Dirk Stelder  8 years ago   viewed: 7129    

3 Answers

1
div.menu2
{
    /*width:500px;margin:0 auto;*//*Uncomment this line to make the menu center-aligned.*/
    text-align:center;
    background-image: url(bg1.gif);
    border:1px solid black;
    font-size:0;
}

div.menu2 a
{
    display: inline-block;
    padding: 0 20px;
    background-image: url(bg.gif);
    color:White;
    text-decoration:none;
    font: bold 12px Arial;
    line-height: 32px;
}

div.menu2 a:hover, div.menu2 a.current
{
    background-position:0 -60px;
}

div.menu2 a.dummy
{
    width:2px;
    padding:0 0;
}
omantel
  7 years ago
0
/*width:500px;margin:0 auto;*//*Uncomment this line to make the menu center-aligned.*/

So you can change above line to: 
width:500px;margin:0 auto;
Milo   7 years ago
-3
Dirk,
Your page is missing <!DOTCTYPE html> at the start of your page. That is fatal to IE.
So your page should start with:
<!DOTCTYPE html>
<html>
<head> ...
Milo   8 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: