CSS - Combo Box Working Only In Quirks Mode
I have a combo box written via JS that only seems to work in quirks mode in firefox. In IE it works in both quirks and SC mode.
here is my js code (i know this is the CSS forum but javascript is changing the css) Code: var fInitCombo=true; // resdraw the combo box locations based on the windo resizing -- if need be window.onresize=resizeCombos; function resizeCombos(complete) { // i take the select and place it in the right position. I also size the text box to be the same size as the combos var oText, oSelect, obj, x, y; for(var i in arrCombo) { x=0; y=0; oText=arrCombo[i].textField; oSelect=arrCombo[i].selectField; obj=oText; while(obj.tagName!="BODY") { x+=obj.offsetLeft; y+=obj.offsetTop; obj=obj.offsetParent; } if(fInitCombo) { oText.style.width=oText.offsetWidth-16; //oSelect.selectedIndex=-1; fInitCombo=false; } if(complete) { //oSelect.selectedIndex=-1; oText.style.marginRight=16; } oSelect.style.left=x; oSelect.style.top=y; oSelect.style.width=oText.offsetWidth+16; oSelect.style.clip="rect(0,"+(oText.offsetWidth+18)+","+(oText.offsetHeight)+","+(oText.offsetWidth-2)+")"; oSelect.style.display="block"; } } function updateCombo(instance,use,oHiddenField) { var oText=arrCombo[instance].textField; var oSelect=arrCombo[instance].selectField; if(use == "t") { oText.value = oSelect.options[oSelect.selectedIndex].text } else if(use == "v") { oText.value = oSelect.options[oSelect.selectedIndex].value } if(arguments.length > 2) { oHiddenField.value = oSelect.options[oSelect.selectedIndex].value } updateComboSelection(arrCombo[instance].selectField,arrCombo[instance].textField); } function comboLoad() { resizeCombos(true); } function updateComboSelection(oSelect,oText) { oSelect.selectedIndex=-1; for(var i=0;i<oSelect.options.length;i++) { //if(oSelect.options[i].text==oText.value) if(oSelect.options[i].text.indexOf(oText.value) == 0) { oSelect.selectedIndex=i; break; } } } subset of my html Code: <form action="##" name="data"> <fieldset style="width:600px"> <LEGEND>Appointment time</LEGEND> <table> <tr> <td> Start: <input type="text" name="start_time" id="start_time" onchange="changeHandler(this);" /><select name="start_time_select" id="start_time_select" onchange="changeHandler(this);" style="position:absolute;display:none;"><option>asdfasd</option></select> </td> </tr> </table> </fieldset> </form> arrCombo is just an array of objects pointing to the text and select fields. Any idea why this only works in quirks mode rather than SC mode it's the Resize combo method is the one thats running to do the combos Similar TutorialsHi, On the page http://simplyfocusing.net/LitSoc/ I have been trying to get CSS rollovers working. I use code similar to this For CSS Code: .nav { width:172px; height:32px; } td#nhome { background-image:url(nav-home.gif); background-repeat:no-repeat; cursor:pointer; } td#nhome img { visibility:hidden; } td#nhome:hover img { visibility:visible; } For HTML Code: <td id="nhome" class="nav"><a href="index.htm"><img src="index_files/nav-home-over.gif" alt="" /></a></td> But the rollovers arent exactly working with IE. Works perfectly in FireFox 1. Also there seems to be some problem with the top right corner in IE. I can correct it by setting height to 0px in .shadowtopcorn but then it screws up FireFox. Any suggestions on what I should do? Thanks a lot quirks mode is what i'm using, but now im thinking that in order to support all browsers i need to jump to strict. now im really in trouble. is strict right for me? xhtml or html? my site works perfectly in firefox because that is what i have been testing it in, but it works horribly in IE. so, will switching to strict give me the best compatibility? I do a lot of we development work for an intranet site. All users are on IE. Occasionally, I'll develop a page that looks fine in my browser (IE 8.0.6001) but not in others (8.0.7600). I have to set mine to compatibility mode to see what others see. I thought the compatibility mode was meant to display a web page the way it would in an older browser. Is it possible that I have something installed on my machine that makes my browser render pages differently? I know this is vague, but I am just wondering if anyone has ideas on where to look. Hey, does anyone know if there's a mozilla equivilent to writing-mode? um .. that's all Thanks Hi folks, I am super excited about the box-sizing css rule. I've always thought the original IE box model was better and it was a shame that we had to ditch their superior model for the w3c one to be cross browser. Now all the browsers are starting to support box-sizing which will allow me to go back to the model I prefer. Unfortunately, pioneering the border-box sizing model, the only way I can get to it (that I know of) in IE6/7 is via quirksmode. Quirksmode has a whole bunch of other issues I don't want so this doesn't see a solution. I'm hoping someone out there will no how I can trigger box-sizing: border-box; in IE6/7 without quirksmode. If it's possible I'll be ditching the w3c box model in a hurry. Cheers, Pete We've got something odd happening on our site. Check out: newser.com/story/82843/conan-obriens-twitter-woman-shows-class.html If you leave your browser window alone for about 5 minutes, eventually the content on the page jumps down. If you scroll, or mouseover the window, it jumps back. Any ideas on the issue? One thing to note -- we're watch for breaking news periodically -- when something big happens, we load a banner above the nav via AJAX. Seems like this may be a factor even though it's usually empty. Hello guys, i've been trying for the past 2 days to google for textarea sizing under strict mode. i have found no solution and at the moment my problem is this... here is the code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "(URL address blocked: See forum rules)"> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <title>Untitled 1</title> <style type="text/css"> .style1 { text-align: center; width: 800px; } </style> </head> <body> <div class="style1" style="padding: 0px; margin: 10px auto 10px auto; background-color: #D6EBF5; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; font-style: normal; color: #000000; width: 800px;">Little Bunny</div> <div class="style1" style="margin: 0px auto 0px auto; background-color: #D6EBF5; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; font-style: normal; color: #000000;"> <div style="width: 400px; float: left; background-color:#EBEDF3; height: 100px; text-align: center; line-height: 100px;">Text</div> <div style="width: 400px; overflow:visible; float: left; background-color:#F2F9E8" id="OuterDiv"> <form method="post"> <textarea cols="0" id="T1" name="TextArea1" rows="3" style="float:left; width:100%; height:100px; margin: 5px; padding:0">efefefefefef</textarea> </form> </div> </div> </body> </html> The Textarea expend over the surrounding Div and it shows differntly under FireFox 3.5.7 and IE 8 (tested for both) I'm trying to do the following: make the textarea width 100% and height 100px for example. + padding 5px outside the textarea (space 5px from left, right, top, bottom).. most importent thing is to see it equaly under both ff and ie.. hope you can correct my code since i'm clueless.... have a nice day It's not letting me post links since I am a new member, so copy paste the link below. (it's an image of what looks wrong in the website) img59.imageshack.us/i/52153657.jpg/ It loads correctly in Firefox and IE8, but the middle column breaks in ie7 and ie8 in compatibility mode. By break I mean the middle column gets shifted to the right side of the middle column and below the right column (while still in the middle column) I have also included the general layout and css below. I have tried changing doc types and a few small things but nothing has even effected the appearance. The website is in a layout like this: html4strict Code: Original - html4strict Code <div id="wrapper1"> <div id="wrapper2"> <div id="maincol"> <div id="leftcol"> </div> <div id="rightcol"> </div> <div id="centercol"> </div> </div> <div id="footer"> </div> </div> </div> <div id="wrapper1"> css Code: Original - css Code #centercol { position:relative; padding:0 200px; min-width: 520px; } #leftcol { position:relative; top:-10px; left:-10px; float:left; width:180px; margin:0 0 -10px 0; padding:10px; z-index:100; } #rightcol { position:relative; top:-10px; right:-10px; float:right; width:180px; margin:0 0 -10px 0; padding:10px; z-index:99; } #maincol { position:relative; margin:0; padding:10px; } #wrapper1 { position:relative; text-align:left; width:100%; min-width: 950px; background:#23415C url("images/side.gif") repeat-y top right; } #wrapper2 { position:relative; text-align:left; width:100%; background:url("images/side.gif") repeat-y top left; } #centercol { Any ideas on how to resolve this problem would be great. Can i add my own imaged to the drop down arrow on the right side of a combo box with css and anything else? Hello! Maybe this is a question with obvious "NO!" answer, but i decided to raise it one more time. Is it avaiable to change apperance of combo-box using CSS styles (or any other way), espessialy it would be great if I could change the border style. I have readed this , and come to a conclusion that it is even impossible. Any ideas? Thanks Artashes Hi , I am trying to print my html page in the landscape mode.I should print this automatically in landscape mode with css orientation landscape. i am using the below code to print all tables in my html page in landscape mode @page rotated { size : landscape } table { page : rotated } Its not working . Is this write or wrong? Is there any other way to do it. Thanks, Hey, it's me again, I was wondering if there is a way to make any header tag (in my case, it's H3) so that the text appears as normal? Essentially, make it so that nothing changes with the text. eg- 'Hello <H3>everybody</H3>' would appear just the same as 'Hello everybody.' I've tried multiple things using CSS, but can't seem to make it work. Why does this css style work only in firefox and not IE : Code: .showhide {font-family: "Trebuchet MS", Geneva, Arial, Helvetica, sans-serif;font-size: 12px;color: #EA6D67;cursor: pointer; onMouseOver:text-decoration: underline;} Everything in the style works apart from the last section: {onMouseOver:text-decoration: underline;} Any ideas? Cheers i have been trying my hand at css recently and done this page with some css in it but some how it does not seem to be working.my main problem is the fact the two divs one holding the navigation table and the other holding the texttable are not able to use the css properties in terms of font size and font alignment.i looks like that i have made some serious or stupid error here.i would appreciate any help with this.thanks.the code of the page is given below. <html> <head> <title> WORKING CSS WITH DIVS.................. </title> </head> <style type="text/css"> div.banner { POSITION:ABSOLUTE; TOP:0; LEFT:0;RIGHT:0; WIDTH:750; HEIGHT:100; OVERFLOW:AUTO; BORDER-LEFT: 5PX SOLID #454545; BORDER-TOP: 5PX SOLID #454545; BORDER-BOTTOM:5PX SOLID #454545; BORDER-RIGHT: 5PX SOLID #454545; FONT-FAMILY:ARIAL; FONT-SIZE:48PX; TEXT-ALIGN:LEFT;COLOR:WHITE; BACKGROUND-COLOR:BLACK; } div.navigationtable { FONT-FAMILY:TAHOMA; FONT-SIZE:10PX;TEXT-ALIGN:LEFT; } div.navigationtable { POSITION:ABSOLUTE; TOP:150; LEFT:10; WIDTH:150; HEIGHT:200; } div.texttable { FONT-FAMILY:BOOK ANTIQUA; FONT-SIZE:10PX; TEXT-ALIGN:JUSTIFY; } div.texttable { POSITION:ABSOLUTE; TOP:150; LEFT:190; WIDTH:560; } </style> <body bgcolor="#ffffff"> <div class="banner"> Hello.com </div> <div class="navigationtable"> <table border=1 cellpadding=0 cellspacing=0 width=150> <tr> <td><a href="http://www.yahoo.com">Yahoo</a></td> </tr> <tr> <td><a href="http://www.rediff.com">Rediff</a></td> </tr> <tr> <td><a href="http://www.bbc.co.uk">BBC</a></td> </tr> <tr> <td><a href="http://www.ebay.com">EBay</a></td> </tr> <tr> <td><a href="http://www.w3schools.com">W3Schools</a> </td> </tr> <tr> <td><a href="http://www.cricket.org">Cricket</a></td> </tr> </table> </div> <div class="texttable"> <table border=1 cellpadding=0 cellspacing=0 width=560> <tr> <td> Viswanathan Anand kept himself in the race for the title by keeping the gap between him and leader Veselin Topalov to just half a point with one more round to go in the Category 20 M-Tel Masters chess tournament at Hotel Grand Sofia. He ensured that the in-form local hero Topalov did not run away with honours with a round to spare. In the last game to finish in the ninth round, Anand squeezed out a fine win in the endgame against a tired looking Michael Adams, who at various stages had even seemed slightly better with white, but it was Anand who seized the chances he got. Anand's win carried him to five points from nine rounds, and a clear second position and Topalov is half a point ahead at 5.5 points. In the final round, Anand will have white pieces against Judit Polgar, who drew her ninth round game against an off- colour Vladimir Kramnik. If Topalov and Anand end up with same points, they will have to have a play-off in rapid, where Anand will have a definite advantage. But for that situation to happen Anand must win against Polgar and hope Topalov does no better than a draw. Viswanathan Anand kept himself in the race for the title by keeping the gap between him and leader Veselin Topalov to just half a point with one more round to go in the Category 20 M-Tel Masters chess tournament at Hotel Grand Sofia. He ensured that the in-form local hero Topalov did not run away with honours with a round to spare. In the last game to finish in the ninth round, Anand squeezed out a fine win in the endgame against a tired looking Michael Adams, who at various stages had even seemed slightly better with white, but it was Anand who seized the chances he got. Anand's win carried him to five points from nine rounds, and a clear second position and Topalov is half a point ahead at 5.5 points. In the final round, Anand will have white pieces against Judit Polgar, who drew her ninth round game against an off- colour Vladimir Kramnik. If Topalov and Anand end up with same points, they will have to have a play-off in rapid, where Anand will have a definite advantage. But for that situation to happen Anand must win against Polgar and hope Topalov does no better than a draw. </td> </tr> </table> </div> </body> </html> i have been trying my hand at css recently and done this page with some css in it but some how it does not seem to be working.my main problem is the fact the two divs one holding the navigation table and the other holding the texttable are not able to use the css properties in terms of font size and font alignment.i looks like that i have made some serious or stupid error here.i would appreciate any help with this.thanks.the code of the page is given below. <html> <head> <title> WORKING CSS WITH DIVS.................. </title> </head> <style type="text/css"> div.banner { POSITION:ABSOLUTE; TOP:0; LEFT:0;RIGHT:0; WIDTH:750; HEIGHT:100; OVERFLOW:AUTO; BORDER-LEFT: 5PX SOLID #454545; BORDER-TOP: 5PX SOLID #454545; BORDER-BOTTOM:5PX SOLID #454545; BORDER-RIGHT: 5PX SOLID #454545; FONT-FAMILY:ARIAL; FONT-SIZE:48PX; TEXT-ALIGN:LEFT;COLOR:WHITE; BACKGROUND-COLOR:BLACK; } div.navigationtable { FONT-FAMILY:TAHOMA; FONT-SIZE:10PX;TEXT-ALIGN:LEFT; } div.navigationtable { POSITION:ABSOLUTE; TOP:150; LEFT:10; WIDTH:150; HEIGHT:200; } div.texttable { FONT-FAMILY:BOOK ANTIQUA; FONT-SIZE:10PX; TEXT-ALIGN:JUSTIFY; } div.texttable { POSITION:ABSOLUTE; TOP:150; LEFT:190; WIDTH:560; } </style> <body bgcolor="#ffffff"> <div class="banner"> Hello.com </div> <div class="navigationtable"> <table border=1 cellpadding=0 cellspacing=0 width=150> <tr> <td><a href="http://www.yahoo.com">Yahoo</a></td> </tr> <tr> <td><a href="http://www.rediff.com">Rediff</a></td> </tr> <tr> <td><a href="http://www.bbc.co.uk">BBC</a></td> </tr> <tr> <td><a href="http://www.ebay.com">EBay</a></td> </tr> <tr> <td><a href="http://www.w3schools.com">W3Schools</a></td> </tr> <tr> <td><a href="http://www.cricket.org">Cricket</a></td> </tr> </table> </div> <div class="texttable"> <table border=1 cellpadding=0 cellspacing=0 width=560> <tr> <td> Viswanathan Anand kept himself in the race for the title by keeping the gap between him and leader Veselin Topalov to just half a point with one more round to go in the Category 20 M-Tel Masters chess tournament at Hotel Grand Sofia. He ensured that the in-form local hero Topalov did not run away with honours with a round to spare. In the last game to finish in the ninth round, Anand squeezed out a fine win in the endgame against a tired looking Michael Adams, who at various stages had even seemed slightly better with white, but it was Anand who seized the chances he got. Anand's win carried him to five points from nine rounds, and a clear second position and Topalov is half a point ahead at 5.5 points. In the final round, Anand will have white pieces against Judit Polgar, who drew her ninth round game against an off- colour Vladimir Kramnik. If Topalov and Anand end up with same points, they will have to have a play-off in rapid, where Anand will have a definite advantage. But for that situation to happen Anand must win against Polgar and hope Topalov does no better than a draw. Viswanathan Anand kept himself in the race for the title by keeping the gap between him and leader Veselin Topalov to just half a point with one more round to go in the Category 20 M-Tel Masters chess tournament at Hotel Grand Sofia. He ensured that the in-form local hero Topalov did not run away with honours with a round to spare. In the last game to finish in the ninth round, Anand squeezed out a fine win in the endgame against a tired looking Michael Adams, who at various stages had even seemed slightly better with white, but it was Anand who seized the chances he got. Anand's win carried him to five points from nine rounds, and a clear second position and Topalov is half a point ahead at 5.5 points. In the final round, Anand will have white pieces against Judit Polgar, who drew her ninth round game against an off- colour Vladimir Kramnik. If Topalov and Anand end up with same points, they will have to have a play-off in rapid, where Anand will have a definite advantage. But for that situation to happen Anand must win against Polgar and hope Topalov does no better than a draw. </td> </tr> </table> </div> </body> </html> im trying to redo my layout in the "tabless" fasion since its the best thing to be doing now i beleive. this is how far i've gotten... http://72.232.208.44/new/newindex.html the navigational links are just barely off. this is becasue they are a unorded list. i adjsuted their list-style-type to be none but it stil shows up with a small smal blank spot where the bullet would go. CSS: Code: A:link{color:#ADD8E6;text-decoration:underline;} A:visited{color:#ADD8E6;text-decoration:underline;} A:active{color:#ADD8E6;text-decoration:underline;} A:hover{color:#ADD8E6;text-decoration:underline;} #banner_container{ margin:auto; text-align:center; } #banner{ border:thin none #000000; border-spacing:0; padding:0; width:750px; height:155px; background-image:url("images/GFG-topBanner_01.jpg"); background-repeat: no-repeat; //text-align:center; margin:auto; } #banner_under{ border:thin none #000000; border-spacing:0; padding:0; width:750px; height:28px; background-image:url("images/GFG-topBanner_02.jpg"); background-repeat: no-repeat; text-align:right; vertical-align:bottom; margin:auto; } #navlist{ border:thin none #000000; border-spacing:0; padding: 0; padding-left: 0; padding-right:0; margin: 0; white-space: nowrap; list-style-type:none; list-style:none; } #navlist li { border:thin none #000000; border-spacing:0; padding: 0; padding-left: 0; padding-right:0; margin: 0; display: inline; list-style-type: none; list-style:none; } UL{list-style-type:none;} TD{text-align: left; border:thin none #000000;padding:0;} TR{border:thin none #000000;padding:0;} BODY{background-color:#003333;margin:auto;} textarea, select, checkbox, input, submit{background-color:#aeb0b0;border-color:#9d9c9c;} .noborder{border:thin none #000000;} HTML: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <SCRIPT SRC="javascript.js" type="text/javascript"></SCRIPT> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div id="banner_container"> <div id="banner"> </div> <div id="banner_under"> <ul id="navlist"> <li><a href="index.html" onMouseover="lightup('pic1')" onMouseout="turnoff('pic1')"><img src="images/bHome.jpg" class="noborder" name="pic1" width="56" height="28" alt=""></a></li> <li><a href="services.php" onMouseover="lightup('pic2')" onMouseout="turnoff('pic2')"><img src="images/bServices.jpg" class="noborder" name="pic2" width="78" height="28" alt=""></a></li> <li><a href="contact.php" onMouseover="lightup('pic3')" onMouseout="turnoff('pic3')"><img src="images/bContact.jpg" class="noborder" name="pic3" width="73" height="28" alt=""></a></li> <li><a href="controlpanel.php" onMouseover="lightup('pic4')" onMouseout="turnoff('pic4')"><img src="images/bControlPanel.jpg" class="noborder" name="pic4" width="113" height="28" alt=""></a></li> </ul> </div> </div> </body> </html> btw i know i can do hover stuff with css i am just trying to work on one thing at a time though Code: .mainnav a:link, .mainnav a:visited { font-family: tahoma; color: #9b9999; font-size: 15px; line-height: 37px; font-weight: bold; margin: 2px 0 0 0px; text-decoration: none; } .mainnav a:hover, .mainnav a:visited:hover { font-family: tahoma; color: brown; font-size: 15px; line-height: 37px; font-weight: bold; margin: 2px 0 0 0px; text-decoration: none; } i wrote them for the mainnav class tags but the links arent effected? i'm using IE7 and targeting the IE7 users with those codes... What's wrong? I checked there is no duplicated implementation... Hello, Simple page trying to get the black line to be at the very top of the page. It works in all browsers (for me) except IE. http://www.gypsydev.us/css/ Any idea what else I need to do? Thanks, GuruGeek Hi all for some reason my css just won't work: http://www.milztech.net/area51/ Css: Code: body { font-family: verdana, geneva; font-size: 52px; background-color: #CCCCCC; } Any ideas?? Code: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Title</title> <STYLE TYPE="text/css"> a:link { color: #808080; font-family:Arial, Helvetica, sans-serif; font-size:12px; text-decoration:underline; } a:hover { color: #A0A0A0; font-family:Arial, Helvetica, sans-serif; font-size:12px; text-decoration:none; } a:active { color: #000000; font-family:Arial, Helvetica, sans-serif; font-size:12px; text-decoration:underline; } a:visited { color: #808080; font-family:Arial, Helvetica, sans-serif; font-size:12px; text-decoration:underline; } version { color: #939393; font-family:Arial, Helvetica, sans-serif; text-decoration:none; font-size:11px; } pagetitle { color: #969696; font-family:Arial, Helvetica, sans-serif; text-decoration:none; font-size:16px; text-transform:capitalize font-weight:700 } </STYLE> </head> Any help is welcome, I am not well versed in CSS. Well, not this CSS. None of the properties are workign in IE. it is frustrating. |