Permalink
Browse files

first commit

  • Loading branch information...
chriscoyier committed Feb 26, 2012
0 parents commit e8abc07207465952a4c5471aa31f96fdf91a889b
Showing with 100 additions and 0 deletions.
  1. 0 README.markdown
  2. +36 −0 css/style.css
  3. +64 −0 index.html
No changes.
@@ -0,0 +1,36 @@
+/*
+ CSS-Tricks Example
+ by Chris Coyier
+ http://css-tricks.com
+*/
+
+* { margin: 0; padding: 0; }
+body { font: 14px Georgia, serif; background: #444; }
+
+article, aside, figure, footer, header, hgroup,
+menu, nav, section { display: block; }
+
+#page-wrap {
+ width: 150px;
+ margin: 0 auto;
+ background: white;
+ padding: 200px 0;
+}
+
+select {
+ width: 150px;
+ padding: 5px;
+ margin: 0 0 20px 0;
+}
+
+h1, h2 {
+ font: bold 16px Sans-Serif;
+ margin: 0 0 10px 0;
+ padding: 0 10px;
+}
+
+h1 {
+ font-size: 30px;
+ margin: 0 0 20px 0;
+ color: red;
+}
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta charset='UTF-8'>
+
+ <title>Select Cutoff Fix</title>
+
+ <link rel='stylesheet' href='css/style.css'>
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <!--[if lt IE 9]>
+ <script>
+ $(function() {
+
+ var el;
+
+ $("select.fix-me")
+ .each(function() {
+ el = $(this);
+ el.data("origWidth", el.outerWidth()) // IE 8 will take padding on selects
+ })
+ .mouseenter(function(){
+ $(this).css("width", "auto");
+ })
+ .bind("blur change", function(){
+ el = $(this);
+ el.css("width", el.data("origWidth"));
+ });
+
+ });
+ </script>
+ <![endif]-->
+</head>
+
+<body>
+
+ <div id="page-wrap">
+
+ <h1>Select Cutoff Fix</h1>
+
+ <h2>Busted in IE 7/8</h2>
+
+ <select>
+ <option value="%5B139%5D+White+Mesh+-+%24119.99">[139] White Mesh - $119.99</option>
+ <option value="%5B169%5D+Black+Mesh++-+%24119.99">[169] Black Mesh - $119.99</option>
+ <option value="%5B149%5D+SafeRail+-+White+Mesh+-+%24125.99">[149] SafeRail - White Mesh - $125.99</option>
+ <option value="%5B179%5D+SafeRail+-+Black+Mesh+-+%24125.99">[179] SafeRail - Black Mesh - $125.99</option>
+ </select>
+
+ <h2>Fixed</h2>
+
+ <select class="fix-me">
+ <option value="%5B139%5D+White+Mesh+-+%24119.99">[139] White Mesh - $119.99</option>
+ <option value="%5B169%5D+Black+Mesh++-+%24119.99">[169] Black Mesh - $119.99</option>
+ <option value="%5B149%5D+SafeRail+-+White+Mesh+-+%24125.99">[149] SafeRail - White Mesh - $125.99</option>
+ <option value="%5B179%5D+SafeRail+-+Black+Mesh+-+%24125.99">[179] SafeRail - Black Mesh - $125.99</option>
+ </select>
+
+ </div>
+
+</body>
+
+</html>

0 comments on commit e8abc07

Please sign in to comment.