Question:

Problem with my website?

by  |  earlier

0 LIKES UnLike

i'm making a website for someone. the website has a drop down navigation menu common to all pages, as well as a left column and right column common to all the pages. the site is getting large, and i know it will only continue to grow.

as of now, the site is done completely in html and css (with a little javascript...). however, there are over 50 different pages, and this number will only continue to go up.

i decided to go ahead and use a little bit of php--put the html code that is common to all pages in a single php file, which i will include in all pages. i will then replace all the common code with simple function calls. this way i can update the entire site very quickly by just editing the php file.

here's my problem. i started to do this today, but ran into some strange errors. while everything looked perfectly normal in firefox, for some reason, the page layout was completely messed up in IE (tested in v. 6 and 7). for example, the drop down navigation menu turned up in the middle of the page instead of the top!

a very simple example of what i did:

original file:

<html>

<head>

stylesheet references...

</head>

<body>

<div id="header">

<div id="menu">

SOME_MENU_CODE

</div>

</div>

</body>

</html>

made a file "nav_menu.php"

<?PHP

function showNav() {

echo("SOME_MENU_CODE");

}

?>

then the index page:

<?PHP include 'nav_menu.php'; ?>

<html>

<head>

stylesheet references...

</head>

<body>

<div id="header">

<div id="menu">

<?PHP showNav(); ?>

</div>

</div>

</body>

</html>

like i said, this works perfectly in firefox, but it dies in IE6 and 7. i have a feeling it's either something very simple i'm overlooking. if you can't think of what is causing this, and you know a better way to update all the pages on a site by editing one file which the other pages reference...please let me know...i'm going crazy here...

thank you!

 Tags:

   Report

2 ANSWERS


  1. try to get it from

    http://webdesignehelp.in/


  2. its an IE bug.. you need to *hack* your css code for IE 7 or 6.

    if you have specified a top, left or margin-top, margin-left, then you really need to overwrite it for IE version.

    a good example would be:

    #menu_nav

    {

    top: 20px;

    left:10px;

    /* IE hack */

    _top: 10px;

    _left 5px;

    }

    hope this helps

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.