Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added tiny css fixes for ie 7; improved select in ie7

  • Loading branch information...
commit c7ff80b28f10b32c1685ecdf4b1ea9784e281bef 1 parent aecbfae
@mediavrog authored
View
8 cfe/modules/select/cfe.module.select.js
@@ -152,14 +152,16 @@ cfe.module.Select = new Class({
afterInitialize: function()
{
-
this.parent();
// set width to widest option if no width is given to select via css
if(this.cssWidth == "auto") this.a.setStyle("width", this.container.getWidth())
+ // inject labelArrow as IE 7 doesn't support :after css selector
+ if(Browser.Engine.trident5) new Element("span").addClass("labelArrow").inject(this.innerlabel, "after")
+
// select default option
- this.selectOption(this.selectedIndex, true);
+ if(this.selectedIndex != -1) this.selectOption(this.selectedIndex, true);
if(this.options.scrolling)
{
@@ -204,7 +206,7 @@ cfe.module.Select = new Class({
this.parent();
- this.a.setStyle("position", "relative");
+ this.a.setStyles({"position": "relative", "z-index": 100000 - this.instance});
// build container which shows on click
this.buildContainer();
View
18 css/cfe.css
@@ -24,6 +24,7 @@ form ul li{
clear: both;
float: left;
padding: 3px;
+ width: 99.7%; /* feel good little ie 7 */
}
label.cfeTextL ,label.cfePasswordL, label.cfeFileL, label.cfeSelectL, label.cfeTextareaL,
@@ -61,6 +62,11 @@ label.D, .cfeButton.D .label, .cfeButtonSlide.D .label{color:#999}
color: #FFF;
}
+.cfeSelectMultiple .cfeOption.H, .cfeSelectMultiple .cfeOption.H label.H{
+ background-color: transparent;
+ color: #333;
+}
+
input[disabled], input[readonly],
textarea[disabled], textarea[readonly]{
color: #CCC;
@@ -299,7 +305,8 @@ label.D{cursor: default}
margin: 1px 19px -1px 4px;
}
-.cfeSelect > .cfeSlide > .label:after{
+/* labelArrow is IE7 only */
+.cfeSelect > .cfeSlide > .label:after, .cfeSelect > .cfeSlide > .labelArrow{
content: " ";
border-width: 6px;
border-color: gray transparent transparent transparent;
@@ -310,7 +317,7 @@ label.D{cursor: default}
margin-left: 3px;
}
-.cfeSelect.H > .cfeSlide > .label:after{
+.cfeSelect.H > .cfeSlide > .label:after, .cfeSelect.H > .cfeSlide > .labelArrow{
border-color: #000 transparent transparent transparent;
}
@@ -400,11 +407,6 @@ label.D{cursor: default}
vertical-align: middle;
}
-.cfeSelectMultiple .cfeOption.H, .cfeSelectMultiple .cfeOption.H label.H{
- background-color: inherit;
- color: inherit;
-}
-
/* file input */
.cfeFilePath, .cfeFilePath .filePath{
margin-left: 5px;
@@ -443,4 +445,4 @@ label.D{cursor: default}
.fileIcon.html, .fileIcon.htm{background-image: url(../gfx/fileicons/html.png)}
.fileIcon.swf, .fileIcon.fla{background-image: url(../gfx/fileicons/flash.png)}
.fileIcon.zip, .fileIcon.rar{background-image: url(../gfx/fileicons/zip.png)}
-.fileIcon.txt, .fileIcon.rtf, .fileIcon.odt{background-image: url(../gfx/fileicons/text.png)}
+.fileIcon.txt, .fileIcon.rtf, .fileIcon.odt{background-image: url(../gfx/fileicons/text.png)}
View
10 css/ie7.css
@@ -0,0 +1,10 @@
+/* IE 7 styles */
+
+/* for IE7 please provide a width for select boxes */
+.cfeSelectSel-Norm{
+ width: 250px;
+}
+
+.cfeSelect > .cfeSlide > .labelArrow{
+ right: 3px;
+}
View
4 demo.html
@@ -5,6 +5,10 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/cfe.css" />
+ <!--[ if IE7]>
+ <link rel="stylesheet" href="css/ie7.css" />
+ <![endif]-->
+
<style type="text/css">
/* resetting styles for browsers */
Please sign in to comment.
Something went wrong with that request. Please try again.