Super wierd FireFox problem/Bug ? Please help | Newbie | | Join Date: Mar 2007
Posts: 3
| |
I'm constructing a website with a layout created with div-tags. They have a fixed width, float left, and display inline. When one of the div's contain a select-element the right-most div floats down for no apparent reason, but when the select-elements are gone they all align as expected. No css apply to the select-elements.
image of prob.: http://sdc.novasol.com/site/nov/TMP/withSelectBoxes.gif
image of expected: http://sdc.novasol.com/site/nov/TMP/noSelectBoxes.gif - <div id="mainArea">
-
<!-- left moduleArea -->
-
<div class="leftModuleArea sideModuleArea width190" style="background-color:#999999">
-
<!-- modules goes here -->
-
<div class="type01 module"> Her er et modul </div>
-
<div class="type01 module"> Her er et modul </div>
-
<!-- end - modules goes here -->
-
</div>
-
<!-- end - left moduleArea -->
-
<!-- contentArea -->
-
<div class="contentArea">
-
<div class="content width530" style="display:inline;">
-
<!-- module -->
-
<div class="module type10Module">
-
<!-- module header area -->
-
<div class="clickable headerArea" onClick="showHideLayers('contentID09','imgID09','buttonDown','buttonUp' )">
-
<!-- ugly firefox fix -->
-
<img src="images/transDot.gif" class="FF_Fix" />
-
<!-- end - ugly firefox fix -->
-
<div class="buttonDown" id="imgID09"></div>
-
<h2>Lynsøgning</h2>
-
<h3>Vælg land, antal, periode og klik søg, for at finde ledige sommerhuse </h3>
-
</div>
-
<!-- end - module header area -->
-
<!-- module content are -->
-
<div class="moduleContentArea">
-
<div class="moduleContentTop"><spacer width="1px" height="1px"></spacer></div>
-
<div class="moduleContent" style="height:400px;">
-
<!-- module content -->
-
<!-- end - module content -->
-
<form>
-
<table width="100%" border="0" cellpadding="0" cellspacing="0">
-
<tr>
-
<td align="right">
-
<h4>Område</h4>
-
</td>
-
<td>
-
<select name="C" class="size100w" onChange="setAction(this.options[selectedIndex].value)">
-
<option value="xx" selected >Vælg</option>
-
<option value=208>Danmark</option>
-
<option value=578>Norge</option>
-
<option value=752>Sverige</option>
-
-
</select>
-
</td>
-
<td rowspan="6">
-
<div class="browseMapArea mapXXXxXXX" style="width:200px; height:250px; background-color:#CCCCCC;"></div>
-
</td>
-
</tr>
-
<tr>
-
<td align="right">
-
<h4>Antal</h4>
-
</td>
-
<td>
-
<select name="PE" class="size100w" id="select">
-
<option value="yy" selected >Vælg</option>
-
<option value=1>1 Person</option>
-
-
</select>
-
</td>
-
</tr>
-
<tr>
-
<td align="right">
-
<h4>Ankomst</h4>
-
</td>
-
<td>
-
<input type="text" class="size100w" name="SD" value="" onFocus="validateStartDate( this.form ); this.blur();return true;" onClick="makeLink('search','SD',document.search.C.options[document.search.C.options.selectedIndex].value)">
-
<a href="javascript:makeLink('search','SD',document.search.C.options[document.search.C.options.selectedIndex].value)"> <img src="http://sdc.novasol.com/pic/nov/images/transDot.gif" class="calendar" alt="Vælg dato"/></a><a href="javascript:makeLink('search','SD',document.search.C.options[document.search.C.options.selectedIndex].value)"></a></td>
-
</tr>
-
<tr>
-
<td align="right">
-
<h4>Afrejse</h4>
-
</td>
-
<td>
-
<input name="ED" value="" class="size100w" onFocus="this.blur(); return true;" onClick="makeLink('search','ED',document.search.C.options[document.search.C.options.selectedIndex].value)">
-
<a href="javascript:makeLink('search','ED',document.search.C.options[document.search.C.options.selectedIndex].value)"> <img src="http://sdc.novasol.com/pic/nov/images/transDot.gif" class="calendar" alt="Vælg dato"/> </a></td>
-
</tr>
-
<tr>
-
<td> </td>
-
<td align="right">
-
<div class="button type01_h30px" style="float:right;">
-
<div class="arrow">
-
<div class="buttonL"></div>
-
<div class="buttonMain"> <a href="#" onClick="doSubmit(document.search.name);"> Søg</a> </div>
-
<div class="buttonR"></div>
-
</div>
-
</div>
-
</td>
-
</tr>
-
<tr>
-
<td> </td>
-
<td align="right">
-
<p id="moreSearchCriteria"><a href="#" class="lookLikeLink" onClick="javascript:doAdvSearch()"> Flere søgekriterier</a> </p>
-
</td>
-
</tr>
-
</table>
-
</form>
-
</div>
-
<div class="moduleContentBottom"><spacer width="1px" height="1px"></spacer></div>
-
</div>
-
<!-- end - module content area -->
-
<div class="moduleBottom"><spacer width="1px" height="1px"></spacer></div>
-
</div>
-
<!-- end - module -->
-
</div>
-
</div>
-
<!-- end - contentArea -->
-
<!-- right moduleArea -->
-
<div class="rightModuleArea sideModuleArea width190" style=" background-color:#3399FF;">
-
<!-- modules goes here -->
-
<div class="module type08Module">
-
<!-- module header area -->
-
<div class="headerArea" >
-
<!-- ugly firefox fix -->
-
<img src="images/transDot.gif" class="FF_Fix" />
-
<!-- end - ugly firefox fix -->
-
<div class="buttonDown" id="imgID02"></div>
-
<h2>Newsletter</h2>
-
<h3>- sign up now </h3>
-
</div>
-
<!-- end - module header area -->
-
<!-- module content are -->
-
<div class="moduleContentArea" id="contentID02">
-
<div class="moduleContentTop"><spacer width="1px" height="1px"></spacer></div>
-
<div class="moduleContent" >
-
<!-- module content -->
-
<p>great deals and good news straight to your inbox </p>
-
<form name="form2" method="post" action="">
-
<input name="textfield" type="text" class="size150w">
-
</form>
-
<div class="button type02_h24px">
-
<div class="v">
-
<div class="buttonL"></div>
-
<div class="buttonMain"><a href="#">knap text</a></div>
-
<div class="buttonR"></div>
-
</div>
-
</div>
-
<!-- end - module content -->
-
</div>
-
<div class="moduleContentBottom"><spacer width="1px" height="1px"></spacer></div>
-
</div>
-
<!-- end - module content area -->
-
<div class="moduleBottom"><spacer width="1px" height="1px"></spacer></div>
-
</div>
-
<div class="module type08Module">
-
<!-- module header area -->
-
<div class="headerArea" >
-
<!-- ugly firefox fix -->
-
<img src="images/transDot.gif" class="FF_Fix" />
-
<!-- end - ugly firefox fix -->
-
<div class="buttonDown" id="imgID02"></div>
-
<h2>Newsletter</h2>
-
<h3>- sign up now </h3>
-
</div>
-
<!-- end - module header area -->
-
<!-- module content are -->
-
<div class="moduleContentArea" id="contentID02">
-
<div class="moduleContentTop"><spacer width="1px" height="1px"></spacer></div>
-
<div class="moduleContent" >
-
<!-- module content -->
-
<p>great deals and good news straight to your inbox </p>
-
<form name="form2" method="post" action="">
-
<input name="textfield" type="text" class="size150w">
-
</form>
-
<div class="button type02_h24px">
-
<div class="v">
-
<div class="buttonL"></div>
-
<div class="buttonMain"><a href="#">knap text</a></div>
-
<div class="buttonR"></div>
-
</div>
-
</div>
-
<!-- end - module content -->
-
</div>
-
<div class="moduleContentBottom"><spacer width="1px" height="1px"></spacer></div>
-
</div>
-
<!-- end - module content area -->
-
<div class="moduleBottom"><spacer width="1px" height="1px"></spacer></div>
-
</div>
-
<div class="module type08Module">
-
<!-- module header area -->
-
<div class="headerArea" >
-
<!-- ugly firefox fix -->
-
<img src="images/transDot.gif" class="FF_Fix" />
-
<!-- end - ugly firefox fix -->
-
<div class="buttonDown" id="imgID02"></div>
-
<h2>Newsletter</h2>
-
<h3>- sign up now </h3>
-
</div>
-
<!-- end - module header area -->
-
<!-- module content are -->
-
<div class="moduleContentArea" id="contentID02">
-
<div class="moduleContentTop"><spacer width="1px" height="1px"></spacer></div>
-
<div class="moduleContent" >
-
<!-- module content -->
-
<p>great deals and good news straight to your inbox </p>
-
<form name="form2" method="post" action="">
-
<input name="textfield" type="text" class="size150w">
-
</form>
-
<div class="button type02_h24px">
-
<div class="v">
-
<div class="buttonL"></div>
-
<div class="buttonMain"><a href="#">knap text</a></div>
-
<div class="buttonR"></div>
-
</div>
-
</div>
-
<!-- end - module content -->
-
</div>
-
<div class="moduleContentBottom"><spacer width="1px" height="1px"></spacer></div>
-
</div>
-
<!-- end - module content area -->
-
<div class="moduleBottom"><spacer width="1px" height="1px"></spacer></div>
-
</div>
-
<!-- end - modules goes here -->
-
</div>
-
<!-- end - right moduleArea -->
-
</div>
|  | Expert | | Join Date: Sep 2006
Posts: 5,566
| | | re: Super wierd FireFox problem/Bug ? Please help
Your links don't work.
|  | Expert | | Join Date: Sep 2006
Posts: 5,566
| | | re: Super wierd FireFox problem/Bug ? Please help
Things like this will never work if width is supposed to be a html or css style:
class="leftModuleArea sideModuleArea width190"
There is no such thing as this:
<spacer width="1px" height="1px"></spacer>
I don't know if you misunderstand how to apply css styling or not. In addition, you have 30 html errors.
You also have a lot of comments about Firefox fixes which is unusual. It is usually IE that needs hacking and not FF.
Which doctype are you using?
| | Newbie | | Join Date: Mar 2007
Posts: 3
| | | re: Super wierd FireFox problem/Bug ? Please help
Links work now - some server syncro error.
I'm sorry but yes - it's a perfectly good and valid way to apply css. As long as I ensure that the different class declarations don't have overlapping properties there is no problems - for instance the width190 class does not affect the div directly, but the contents of it. each of the three classes fullfill different purposes. regarding:<spacer width="1px" height="1px"></spacer> - it's a hack and it prevents an undesired behavior in IE - completly unrelated to the problem I'm describing.
Regarding my html errors - neither are related to the problem and are merly formal not practical.
I'm using - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Quote:
Originally Posted by drhowarddrfine Things like this will never work if width is supposed to be a html or css style:
class="leftModuleArea sideModuleArea width190"
There is no such thing as this:
<spacer width="1px" height="1px"></spacer>
I don't know if you misunderstand how to apply css styling or not. In addition, you have 30 html errors.
You also have a lot of comments about Firefox fixes which is unusual. It is usually IE that needs hacking and not FF.
Which doctype are you using? | | Newbie | | Join Date: Mar 2007
Posts: 3
| | | re: Super wierd FireFox problem/Bug ? Please help
Well, ... Success at last. After a great number of hours I finaly managed to eliminate the problem. instead of using display: inline I used display: table, and that did the trick. (I still consider it a FF bug though)
|  | Expert | | Join Date: Sep 2006
Posts: 5,566
| | | re: Super wierd FireFox problem/Bug ? Please help
Debugging valid code is difficult enough without having to debug invalid code. I am not aware of any such issues with Firefox so it can only be attributed to your code.
I was confused with your class of width530 or whatever. It gave me the impression you were trying to style the width as that but, as you said, you can have multiple classes.
I recommend you use the strict doctype. New pages have no need for transitional.
| | Newbie | | Join Date: Apr 2007
Posts: 3
| | | re: Super wierd FireFox problem/Bug ? Please help
I'm having the same issue as the original poster with Firefox v2.0.0.3!
I have setup my code so that the specific error is easy to see. I have also tested my code to ensure that it's valid HTML (save the 1 intentional error in example 3, where a SELECT has no defined OPTIONs, yet the layout is correctly rendered by FF!?).
Any insights are greatly appreciated!
BTW... the original posters purposed "display: table;" fix didn't work for me, in fact example 4 shows that it's just the opposite for my example!? |  | Expert | | Join Date: Sep 2006
Posts: 5,566
| | | re: Super wierd FireFox problem/Bug ? Please help
A quick response after having just gotten back into town.
Your doctype is incomplete. See the sticky at the top of this board. Haven't looked at the code but ALL new pages should use strict. I'll look at this more later.
|  | Expert | | Join Date: Sep 2006
Posts: 5,566
| | | re: Super wierd FireFox problem/Bug ? Please help
It may have been better to start a new thread. I'm not sure of the problem so can you please state it.
| | Newbie | | Join Date: Apr 2007
Posts: 3
| | | re: Super wierd FireFox problem/Bug ? Please help Quote:
Originally Posted by drhowarddrfine It may have been better to start a new thread. I'm not sure of the problem so can you please state it. I found this thread researching this problem, and I believe it is indeed the same issue the original poster encountered. I figured that if I found it via Google and a solution was not found then I should contribute to the current thread, as opposed to starting a new one. As for a description of the issue...
All 4 examples should be positioned the same, but Example #1's "Mailing Address" DIV incorrectly wraps below the "Physical Address" DIV. This does not occur in Examples #2-4 (nor does it happen to Example #1's "Personal Information" and "Contact Information" DIVs) even though the same CSS is used across all the DIVs. Example #1 has the intended markup, but the CSS renders it incorrectly. Examples #2-4 have modified markup (read: not what I need it to be) to show that the CSS is properly applied in at least 3 differing cases.
It seems that under FireFox SELECTs (or their child OPTIONs) have some mystery CSS attribute applied to them that causes them to have an implicit "clear: right;" or "clear: both;"!? At least that seems to be the effect that is happening in this example.
I greatly appreciate your input on this problem, it's a real noodle-scratcher =)
| | Newbie | | Join Date: Apr 2007
Posts: 3
| | | re: Super wierd FireFox problem/Bug ? Please help
Agh, ha... well there you have it I guess... this is either a FireFox bug or there is simply no solution to the weird (and relativity basic) question.
Back to Google you go! Quote:
Originally Posted by campbeln I found this thread researching this problem, and I believe it is indeed the same issue the original poster encountered. I figured that if I found it via Google and a solution was not found then I should contribute to the current thread, as opposed to starting a new one. As for a description of the issue...
All 4 examples should be positioned the same, but Example #1's "Mailing Address" DIV incorrectly wraps below the "Physical Address" DIV. This does not occur in Examples #2-4 (nor does it happen to Example #1's "Personal Information" and "Contact Information" DIVs) even though the same CSS is used across all the DIVs. Example #1 has the intended markup, but the CSS renders it incorrectly. Examples #2-4 have modified markup (read: not what I need it to be) to show that the CSS is properly applied in at least 3 differing cases.
It seems that under FireFox SELECTs (or their child OPTIONs) have some mystery CSS attribute applied to them that causes them to have an implicit "clear: right;" or "clear: both;"!? At least that seems to be the effect that is happening in this example.
I greatly appreciate your input on this problem, it's a real noodle-scratcher =) |  | Expert | | Join Date: Sep 2006
Posts: 5,566
| | | re: Super wierd FireFox problem/Bug ? Please help
I looked at it briefly but went out of town. Now I've got some problems that need taking care of so just haven't had the time. Yes, the solution isn't obvious to me.
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,419 network members.
|