473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

html/css problem in firefox

Hi

I already posted this in the javascript group, but seemed to be the
wrong place to ask. The code I will post here works in IE, but not in
ff. Its basically a group of li that contain divs. Clicking on one of
the nested divs, should hide/show other nested divs. In ff, the li
(whose div should hide) moves a line up, messing up things totally.

Is there a good soul that wanna see this and try to understand what the
problem could be?
The page is set up at:
http://www.e-mercatone.com/test/test4.html

This is the html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>something</title>
<script language="JavaScript" type="text/javascript"
src="thejs.js"></script>
<link rel="stylesheet" href="thestyle.css" type="text/css">
</head>
<body>
<div
style="height:650px;background-color:gray;width:800px;margin-left:auto;margin-right:auto;float:center;">
<div id="content"
style="background-color:gray;width:250px;height:300px;float:left;">
<div style="height:200px;">
<div style="float:left;">
<ul class="sortabledemo" id="secondlist"
style="height:150px;width:200px;">
<li class="orange" id="secondlist_secondlist1">
<div style="width:200px;">
<div class="handle"
style="background-color:#999999;float:left;width:160px;

height:18px;cursor:move;font-family:Verdana;font-size:8pt;font-weight:bold;">
&nbsp;Music
</div>
<div style="float:left;width:20px;height:18px;
cursor:pointer;text-align:center;">
<img width="20" height="18" src="min.gif" id="musicMin" alt=""
onclick="minimizeThis('underMusic', 'musicMin')" />
</div>
<div style="height:18px;float:left;width:20px">
<img width="20" height="18" src="max.gif" alt="" />
</div>
<div id="underMusic" style="display:block;padding:5px;">
text
</div>
</div>
</li>
<li class="orange" id="secondlist_secondlist2">
<div style="width:200px;">
<div class="handle"
style="background-color:#999999;float:left;width:160px;

height:18px;cursor:move;font-family:Verdana;font-size:8pt;font-weight:bold;">
&nbsp;Sport
</div>
<div style="float:left;width:20px;height:18px;
cursor:pointer;text-align:center;">
<img width="20" height="18" alt="" src="min.gif" id="sportMin"
onclick="minimizeThis('underSport', 'sportMin')" />
</div>
<div style="height:18px;float:left;width:20px">
<img width="20" height="18" alt="" src="max.gif" />
</div>
<div id="underSport" style="display:block;padding:5px;">
text
</div>
</div>
</li>
<li class="orange" id="secondlist_secondlist3">
<div style="width:200px;">
<div class="handle"
style="background-color:#999999;float:left;width:160px;

height:18px;cursor:move;font-family:Verdana;font-size:8pt;font-weight:bold;">
&nbsp;Games
</div>
<div style="float:left;width:20px;height:18px;
cursor:pointer;text-align:center;">
<img width="20" height="18" alt="" src="min.gif" id="gamesMin"
onclick="minimizeThis('underGames', 'gamesMin')" />
</div>
<div style="height:18px;float:left;width:20px">
<img width="20" height="18" alt="" src="max.gif" />
</div>
<div id="underGames" style="display:block;padding:5px">
text
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>
************************************************** *************************
This is the css:

ul.sortablelist {
list-style-image:none;
list-style-type:none;
margin-top:5px;
margin:0px;
padding:0px;
}
ul.sortabledemo li {
padding:0px;
margin:0px;
}
li.green {
background-color: #ECF3E1;
border:1px solid #C5DEA1;
cursor: move;
}
li.orange {
border:1px solid #333333;
background-color: white;
}

***************************************

And this is the js:

function minimizeThis(arg, imgid) {
var d, i;
if (document.getElementById
&& (d = document.getElementById(arg))
&& (i = document.getElementById(imgid))
&& d.style ){
if ('none' == d.style.display){
d.style.display = '';
d.style.height = '100px';
i.src = 'min.gif';
}
else {
d.style.display = 'none';
d.style.height = '1px';
i.src = 'max2.gif';
}
}
}

Dec 17 '05 #1
5 10104
ru************@hotmail.com wrote:

I already posted this in the javascript group, but seemed to be the
wrong place to ask. The code I will post here works in IE, but not in
ff. Its basically a group of li that contain divs. Clicking on one of
the nested divs, should hide/show other nested divs. In ff, the li
(whose div should hide) moves a line up, messing up things totally.

You floated everything in sight. It was really quite unnecessary. I
removed all instances of float:left and changed the rest as shown below.

Try this:
<ul class="sortablelist" id="secondlist" style="height: 150px; width: 200px;">
<li class="orange">
<div style="float: right">
<img src="t_files/min.gif" style="cursor: pointer;" alt=""
onclick="minimizeThis('underMusic', 'musicMin')" height="18" width="20">
<img src="t_files/max.gif" alt="" height="18" width="20">
</div>

<div class="handle" style="background-color: rgb(153, 153, 153);
font-family: Verdana; font-weight: bold;">
&nbsp;Music
</div>

<div id="underMusic" style="padding: 5px; height: 100px;">
text
</div>
</li>
...
</ul>

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Dec 17 '05 #2
Oh great, it works :)
Thanks

Dec 18 '05 #3
Once upon a time *r*************@hotmail.com* wrote:
Oh great, it works :)
Thanks


What works? Thanks to who?

How to quote: http://www.netmeister.org/news/learn2quote.html#toc2
From Google: http://www.safalra.com/special/googlegroupsreply/

--
/Arne

Tech Support: Your password is the small letter a as in apple,
a capital letter V as in Victor, the number 7.
Customer: Is that 7 in capital letters?
Dec 18 '05 #4
In article <40*************@individual.net>,
Arne <in*****@domain.invalid> wrote:
Once upon a time *r*************@hotmail.com* wrote:
Oh great, it works :)
Thanks


What works? Thanks to who?

How to quote: http://www.netmeister.org/news/learn2quote.html#toc2
From Google: http://www.safalra.com/special/googlegroupsreply/


From now on, assume they are all thanking *me*. If they're cursing,
assume they are all cursing you :-)
Seriously, a pretyped boilerplate response to this stuff is really in
order. I have a small one but have only used it once. Here's mine:

<text>
These offered links do not address your question but are of direct
benefit to you. The links below will help you if you wish to be
helped. This posting is not meant to offend you.

<news:news.announce.newusers>
<http://oakroadsystems.com/genl/unice.htm>
<http://www.safalra.com/special/googlegroupsreply/>
<http://blinkynet.net/comp/uip5.html>
</text>

Someone with authority in the group(s) could make a boilerplate link
that everyone can cite. Perhaps in the allmyfaqs domain and give
everyone a link to post to this stuff instead of answering questions.
Of course, the question is original and doesn't show the problem till
later, but a more clever person than me can figure out the proper
response. The problem is usenet-wide as you know.

leo

--
<http://web0.greatbasin.net/~leo/>
Dec 18 '05 #5
Sorry all. I wanted to thank Jim Moe. Its solution works great:
Jim Moe wrote:
You floated everything in sight. It was really quite unnecessary. I
removed all instances of float:left and changed the rest as shown below.

Try this:
<ul class="sortablelist" id="secondlist" style="height: 150px; width: 200px;">
<li class="orange">
<div style="float: right">
<img src="t_files/min.gif" style="cursor: pointer;" alt=""
onclick="minimizeThis('underMusic', 'musicMin')" height="18" width="20">
<img src="t_files/max.gif" alt="" height="18" width="20">
</div>

<div class="handle" style="background-color: rgb(153, 153, 153);
font-family: Verdana; font-weight: bold;">
&nbsp;Music
</div>

<div id="underMusic" style="padding: 5px; height: 100px;">
text
</div>
</li>
...
</ul>


PS: am a little stressed but I promise I will learn to quote before
posting next time :)

Dec 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Lian | last post by:
Hi all, It is a newbie's question about html tag "img". The attributes "title" and "alt" for "img" seems having the same function. So what is the main difference between them? Can i use them at...
22
by: Trammel | last post by:
Hi, I am here to request support from anyone that has idea's on cross-browser HTML (Mainly Firefox and IE). My personal website http://trammel.no-ip.info works fine on Firefox but IE decides to...
3
by: Alex | last post by:
Hi, I'm having some trouble implementing a popup in firefox. I attached some simplified code at the bottom. This is part of a firefox extension. What happens is that a popup window is created,...
9
by: Veerle | last post by:
Hi, I would like to divide the whole of my html page in 4 equal rectangles using only div tags in my html. The result should look a bit like this site:...
10
by: Eric Lindsay | last post by:
This may be too far off topic, however I was looking at this page http://www.hixie.ch/advocacy/xhtml about XHTML problems by Ian Hickson. It is served as text/plain, according to Firefox...
0
by: phil-news-nospam | last post by:
This is expanding on my previous question about gutters in tables. Here are 3 URLs for sample pages I'm testing with. They vary only by the table element attribute cellspacing, with values 0, 1,...
10
by: Josselin | last post by:
(Mac 10.4.6 , Firefox/1.5.0.3 Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; fr; rv:1.8.0.3) Gecko/20060426 ) I am trying to setup a Reusable Image Cache in JS ( as per...
10
by: VK | last post by:
Richard Cornford wrote: > The html element is the outermost element in an (x)HTML document. > All other elements are its descendants, with its direct children being > the head and body elements. ...
16
by: Eric | last post by:
I have a user of a web application written in Java/JSP that is unable to login to the site simply because certain links on the page do not run when they are clicked. Other popups using Javascript...
1
by: reemamg | last post by:
Have a piece of code which works in Firefox however doesnt work in IE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <meta...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.