Hi!
I’ve made Ajax search with custom temlate:
<div class="dd" style="">
[+as.showForm:is=`1`:then=`
<form [+as.formId+] action="[+as.formAction+]" method="post">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td valign="top" background="main_imgs/search.png" align="center" valign="middle" style="padding-top:4px;">
<input type="hidden" name="advSearch" value="[+as.advSearch+]" />
<input id="ajaxSearch_input" style="background:none; border:none; display:block; padding-left:10px;" size="16" height="22px" type="text" value="" border="0" name="search" value=""[+as.inputOptions+]>
</td>
<td width="54px" valign="middle">
<input style="background:none; border:none; width:54px; height:22px; background-color:#f8712f; color:#333333; font-size:12px; font-weight:bold;" type="submit" value="Search"></td></tr> </table>
</div>
But it is shown not on its place (it goes in the bottom of the page) in Firefox only.
I’ve added the code for IE and Opera:
<!--[if IE]>
<style type="text/css">
.dd{
margin-top: 0px;
}
</style>
<link rel="stylesheet" type="text/css" href="style/ie.css" />
<![endif]-->
<script type="text/javascript">
<!--
if(window.opera) {document.write('<link rel="stylesheet" type="text/css" .dd{
margin-top: 0px; href="style/opera.css" />');}
//-->
</script>
But I dont know how to add correction for Firefox in my template?
Thanks a lot!
Alex
Getting higher! | www.djabuzz.com
-
MODX Staff
- 1,535 Posts
Kind of difficult, verging on impossible, to start to diagnose the problem with the amount of code you have posted up - do you have a link to the page in question?
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com
Quote from: garryn at Feb 08, 2009, 01:50 AM
Kind of difficult, verging on impossible, to start to diagnose the problem with the amount of code you have posted up - do you have a link to the page in question?
Sure! Here is the link:
http://alex-pro.net/AH/index.php?id=30
Getting higher! | www.djabuzz.com
Quote from: ganeshXL at Feb 08, 2009, 10:50 AM
this looks strange:
if(window.opera) {document.write('<link rel="stylesheet" type="text/css" .dd{
margin-top: 0px; href="style/opera.css" />');}
you have inline style definition (.dd) AND a reference to an external stylesheet there. Shouldn’t that be
if(window.opera) {document.write('<link rel="stylesheet" type="text/css" href="style/opera.css" />');}
?
Doesnt help
Getting higher! | www.djabuzz.com
I forgot to mention: the site looks 100% identical here in both IE7 + FF3. Which Firefox version are you using? OS?
Quote from: ganeshXL at Feb 08, 2009, 02:58 PM
I forgot to mention: the site looks 100% identical here in both IE7 + FF3. Which Firefox version are you using? OS?
Very strange. It looks correct or search bar is not on its place (over and behind the banner)?
I use:
FF 3.0.6
Windows XP SP3
Getting higher! | www.djabuzz.com
[SOLVED]
It was css problem. With correct css works good.
Getting higher! | www.djabuzz.com
Ya, nicely done! I corrected the CSS and it works really good. I am using Firefox 3.6.1 , what are you using ?