ThemeShaper Forums » ThemeShaper WordPress Themes

[closed]

CSS in Wordpress Menu dont't work in IE

(3 posts)
  • Started 12 years ago by shark_kk
  • Latest reply from shark_kk
  • This topic is resolved
  1. shark_kk
    Member

    Hey friends, Im building my own wordpress theme and i have problem that CSS dont load to my menu in IE (internet explorer) and i dont know what is the problem.
    My page is www.alanklepacz.pl
    And it can help i hope :

    nav ul li {
    	list-style: none;
    	text-decoration: none;
    	background: #868686;
    	margin-left: -40px; /* Ale dlaczego ? */
    	margin-bottom: 5px;
    }
    
    nav ul li a{
    	display: block;
    	text-decoration: none;
    	width: 200px;
    	font: 24px Verdana, Serif;
    	font-weight: bold;
    	color: #fff;
    	padding-left: 10px;
    }
    
    nav ul li a:hover {
    	background: #e37661;
    	width: 190px;
    }

    And this is in sidebar.php

    <nav>
    	<?php wp_nav_menu(array('menu' => 'Menu')); ?>
        </nav>

    And also the part code of functions.php

    if (function_exists('register_nav_menus')) {
    	register_nav_menus(
    		array(
    			'main_nav' => 'Menu'
    			)
    	);
    	}
    Posted 12 years ago #
  2. As far as I know (I don't use html5 yet), you will have to do 2 things.

    Old IE's require you to define new elements as a block, most people use a reset like http://html5doctor.com/html-5-reset-stylesheet/

    Also, you will need to load a JavaScript file in the head, http://code.google.com/p/html5shiv/

    Posted 12 years ago #
  3. shark_kk
    Member

    Oh, Thank You Sir
    It worked great !

    I implemented the

    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    and now it works just fine ;)

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.