/    Sign up×
Community /Pin to ProfileBookmark

Strange behaviour of FireFox in drop down and divs.Please advice

Hi all

i have included a snapshot of the problem i experience in FireFox and the code responsible for this error.

code (viewcontacts.asp):

<!–#include file=”header.htm”–>
<div id=”breadCrumb”>
<font face=”Verdana, Arial, Helvetica, sans-serif” size=”4″ color=”#FFFFFF”>View Groups</font>
</div>
<%
if session(“username”)=”” then
session(“loginurl”)=”viewgroups.asp”
%>
<!–#include file=”error_footer.htm”–>
<%
response.end
end if

OpenDataBase conn
If Request(“page”) = “” then CurrentPage = 1 Else CurrentPage = CInt(Request(“page”))
alpha=request(“alpha”)
if len(alpha)<>0 then crit=” and groupname like ‘” & alpha & “%’ ” else crit=””
sql=”select * from groups where userid=” & session(“userid”) & crit & ” order by groupname asc”

Set rs = Server.CreateObject(“ADODB.Recordset”)
rs.Open SQL, conn, 1,1
‘on error resume next

if rs.eof<>true then
rs.movefirst
rs.PageSize = NumPerPage
TotalPages = rs.PageCount
rs.AbsolutePage = CurrentPage
end if
if totalpages=”” then totalpages=”1″

%>

<div id=”content”>
<div class=”feature”>
<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>
<TR>
<TD width=”100%” height=”37″>
<p style=”word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0″> etc etc etc

if i remove the lines from “OpenDataBase conn” till “if totalpages=”” then totalpages=”1″ ” then this is displayed just fine in FireFox. The drop down menu is placed just below its hovered item.

fiy, for all the other pages in the site, the drop down bar is displayed correctly
Can you please help me out on how to fix this issue?

thanks in advance,

Foundas

[upl-file uuid=5872d49d-0adb-41f8-bf2e-b161c03d46aa size=69kB]error.JPG[/upl-file]

to post a comment
CSS

14 Comments(s)

Copy linkTweet thisAlerts:
@drhowarddrfineJul 24.2005 —  if totalpages="" then totalpages="1"[/QUOTE]
Don't you mean if totalpages == "" then totalpages="1" ?

This is an asp problem not CSS.
Copy linkTweet thisAlerts:
@JPnycJul 24.2005 — VBscript doesn't use the == comparison operator. His syntax is correct.
Copy linkTweet thisAlerts:
@FoundasauthorJul 24.2005 — the syntax is correct.



any advice?


thanks
Copy linkTweet thisAlerts:
@JPnycJul 24.2005 — Not offhand, sorry. I can't think of any reason the VBscript should have any effect on placement. Does it do that in Opera too? Looks like a bug in FF. The browser should ignore anything between <% these %>. M
Copy linkTweet thisAlerts:
@FoundasauthorJul 24.2005 — this is how the page is shown in Opera.


all pages are like this one

[upl-file uuid=4520ba0b-0f55-4b6e-9d75-e9b4cdb83d16 size=72kB]opera.JPG[/upl-file]
Copy linkTweet thisAlerts:
@ray326Jul 24.2005 — Looks like a bug in FF. The browser should ignore anything between <% these %>.[/QUOTE]The HTML delivered to the browser should not contain those in the first place.
Copy linkTweet thisAlerts:
@ray326Jul 24.2005 — So the only browser that displays this properly is IE or is that Opera snap suppose to be correct? Do you have a valid doctype at the top of the page? Have you tried validating the generated HTML?
Copy linkTweet thisAlerts:
@JPnycJul 24.2005 — It's not. It's serverside. But he says removing it solves the issue. Beats me why that would be.
Copy linkTweet thisAlerts:
@JPnycJul 24.2005 — This may have to do with the different default margins for the body and html elements in the different browsers. Try denoting a margin and padding for them in your css. I don't remember exactly but I think Opera has a default 8px padding or margin. I can't remember which.
Copy linkTweet thisAlerts:
@FoundasauthorJul 25.2005 — i made a file for just displaying the drop down menu.

in all three browsers (IE,FF,Opera) the drop down is displayed just fine

but, when i include this file inside a <div>, i get that messy output in Opera, the strange behaviour with some pages in FF, whereas, it works ok in IE

i even used a different CSS template from DreamWeaverMX 2004, but exactly the same behaviour


please tell me what files you need me to include to find the solution for this


thanks in advance
Copy linkTweet thisAlerts:
@JPnycJul 25.2005 — What happens if you don't use an include? Put the html inside the main page file.
Copy linkTweet thisAlerts:
@FoundasauthorJul 25.2005 — JPnyc: if i put the html code directly inside the DIV, then :

IE: still works ok

FF: now, ALL thel pages have that space in the drop down menu

Opera: same behaviour as before
Copy linkTweet thisAlerts:
@JPnycJul 25.2005 — Can we see all the HTML involved in the menu, as well as all CSS for it? Thanks. I have all those browsers here to test with.
Copy linkTweet thisAlerts:
@FoundasauthorJul 25.2005 — here you are JPnyc

[upl-file uuid=2a10a2fe-c555-4524-a8bc-ebc12bbb5137 size=15kB]test.zip[/upl-file]
×

Success!

Help @Foundas spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...