mgkoko Posted April 28, 2008 Share Posted April 28, 2008 I am really new to PHP, I am not even sure whethere this css problem or PHP. This is the website I have been working on http://www.advancedneurotraining.ie/. I am doing a simple php include for my top menu as it will be reuse in many pages. if you look on FF and Safari it is all fine in terms of design but in IE there seems to be a top margin about 20px above the include content. I try moving all the content from include file to my home page and it works fine but as soon as I put it back to the include file it is giving me that gap in IE. ??? ??? this is my index.php file. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Advanced Neuro Training</title> <link href="style/style.css" rel="Stylesheet" type="text/css" /> <script type="text/javascript" src="/scripts/main.js"></script> </head> <body> <div id="header"> </div> <?php include("top_menu.php")?> <div id="main_body"> <div id="main_left_column"> <h2>Home</h2> <p style="text-align:justify;"> The first and only company in Ireland to offer Brainwave training through a comprehensive range of clinical and professional services from ADHD/ADD to Migranines right through to Peak performance training in Business and Sports <a href="#">See full List</a> </p> <div style="margin-top:3px; margin-right:15px;"> <img src="images/ant_logo.jpg" alt="Advanced Neuro Training" /> </div> </div> <div id="main_right_column"> <div> <img src="images/mail.jpg" alt="Advanced Neuro Training" /> </div> <p style="text-align:justify; margin-top:15px;"> <h1>This Site is still under construction</h1><br /> Abnormal brainwave patterns are associated with brain dysfunctions and a wide range of mental disorders, most of which have been treated with psychotropic and neurotropic medications. Neurofeedback training offers a drug free, non invasive and lasting alternative way to normalize and improve brain function. </p> <p style="text-align:justify;"> "Frank H. Duffy, M.D., a Professor and Pediatric Neurologist at Harvard Medical School, stated in an editorial in the January 2000 issue of the journal Clinical Electroencephalography that scholarly literature now suggests that neurofeedback “should play a major therapeutic role in many difficult areas. In my opinion, if any medication had demonstrated such a wide spectrum of efficacy it would be universally accepted and widely used” (p. v). “It is a field to be taken seriously by all” (p. vii)." </p> <p> We offer a free 20 minute consultation to all clients <a href="peak_performance.php">Peak Performance Program</a> </p> <p> Please contact us on <a href="mailto:[email protected]">[email protected]</a> </p> </div> </div> </body> </html> This is my top_menu.php file: <div id="top_bar"> <div id="top_menu_container"> <div class="top_menu_separator_box"> </div> <div class="top_menu" onmouseover="javascript:hide_all_sub_menus();"> <a href="/">Home</a> </div> <div class="top_menu_separator_box"> </div> <div class="top_menu2"> <div onmouseover="javascript:show_menu_drop_down('about_drop_down');" onmouseout="javascript:hide_all_sub_menus();" class="top_menu_item"> <a href="#">About Neurofeedback</a> </div> <div id="about_drop_down" class="top_menu_drop_down" onmouseout="javascript:hide_menu_drop_down(this);"> <div onmouseover="javascript:show_menu_drop_down('about_drop_down');" class="top_sub_menu_item"><a href="what_is_neuro_feedback.php">What is Neurofeedback</a></div> <div onmouseover="javascript:show_menu_drop_down('about_drop_down');" class="top_sub_menu_item"><a href="how_effective_neuro_feedback.php">How effective is Neurofeedback</a></div> <div onmouseover="javascript:show_menu_drop_down('about_drop_down');" class="top_sub_menu_item"><a href="history_neuro_feedback.php">History of Neurofeedback</a></div> </div> </div> <div class="top_menu_separator_box"> </div> <div class="top_menu2"> <div onmouseover="javascript:show_menu_drop_down('clinical_drop_down');" onmouseout="javascript:hide_all_sub_menus();" class="top_menu_item"> <a href="clinical_services.php">Clinical Services</a> </div> <div id="clinical_drop_down" class="top_menu_drop_down" onmouseout="javascript:hide_menu_drop_down(this);"> <div onmouseover="javascript:show_menu_drop_down('clinical_drop_down');" class="top_sub_menu_item"><a href="clinical_services.php">Services</a></div> <div onmouseover="javascript:show_menu_drop_down('clinical_drop_down');" class="top_sub_menu_item"><a href="conditions_treated.php">Conditions treated</a></div> <div onmouseover="javascript:show_menu_drop_down('clinical_drop_down');" class="top_sub_menu_item"><a href="peak_performance.php">Peak Performance</a></div> </div> </div> <div class="top_menu_separator_box"> </div> <div class="top_menu2"> <div onmouseover="javascript:show_menu_drop_down('links_drop_down');" onmouseout="javascript:hide_all_sub_menus();" class="top_menu_item"> <a href="#">Links</a> </div> <div id="links_drop_down" class="top_menu_drop_down" style="width:200px;" onmouseout="javascript:hide_menu_drop_down(this);"> <div onmouseover="javascript:show_menu_drop_down('links_drop_down');" class="top_sub_menu_item"> <a href="http://www.isnr.org" target="_blank">www.isnr.org</a> </div> <div onmouseover="javascript:show_menu_drop_down('links_drop_down');" class="top_sub_menu_item"> <a href="http://www.peakachievement.com" target="_blank">www.peakachievement.com</a> </div> <div onmouseover="javascript:show_menu_drop_down('links_drop_down');" class="top_sub_menu_item"> <a href="http://www.openfocus.com" target="_blank">www.openfocus.com</a> </div> </div> </div> <div class="top_menu_separator_box"> </div> <div class="top_menu" onmouseover="javascript:hide_all_sub_menus();"> <a href="research.php">Research</a> </div> <div class="top_menu_separator_box"> </div> <div class="top_menu" onmouseover="javascript:hide_all_sub_menus();"> <a href="contact.php">Contact</a> </div> </div> </div> This is a link to my css file: http://www.advancedneurotraining.ie/style/style.css Thanks in advance, Please let me know if you are not sure about my question. KK Link to comment https://forums.phpfreaks.com/topic/103324-php-include-and-margin-problem/ Share on other sites More sharing options...
trq Posted April 28, 2008 Share Posted April 28, 2008 Have you tried validating your html to see if there are any issues? php is very unlikely to be the problem, it simply outputs strings. Link to comment https://forums.phpfreaks.com/topic/103324-php-include-and-margin-problem/#findComment-529183 Share on other sites More sharing options...
mgkoko Posted April 28, 2008 Author Share Posted April 28, 2008 I've tried validating HTML and it seems to be fine. You are right it is very unlikely to be PHP probelm. ??? ??? but still can't figure out what is wrong in my HTML or CSS and why is it working fine in IE and safari. I'm goona make some test with PHP include with just basic html and see it works fine. Thanks again, KK Link to comment https://forums.phpfreaks.com/topic/103324-php-include-and-margin-problem/#findComment-529211 Share on other sites More sharing options...
mgkoko Posted April 28, 2008 Author Share Posted April 28, 2008 but still can't figure out what is wrong in my HTML or CSS and why is it working fine in IE and safari <<<< sry my mistake , it works fine in FF and Safari but not in IE Link to comment https://forums.phpfreaks.com/topic/103324-php-include-and-margin-problem/#findComment-529213 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.