Search Results

Search found 287 results on 12 pages for 'moz'.

Page 10/12 | < Previous Page | 6 7 8 9 10 11 12  | Next Page >

  • My fade in goes to all opaque for it goes to transparent

    - by DerNalia
    So, I'm trying to fade in a transparent div, kinda like hulu does when you click dim lights... here is what i have: //show the bg new Effect.Appear('darkBackgroundLayer', {duration: 0.3}); then when my pop up is initialized // create the div for background dimming if($('darkBackgroundLayer')){ Element.remove('darkBackgroundLayer') } var transparentBG = document.createElement('div'); transparentBG.className = 'darkenBackground'; transparentBG.id = "darkBackgroundLayer" transparentBG.style.display = "none"; document.body.appendChild(transparentBG); and the CSS for the new div .darkenBackground { background-color: rgb(0, 0, 0); opacity: 0.7; /* Safari, Opera */ -moz-opacity:0.70; /* FireFox */ filter: alpha(opacity=70); /* IE */ z-index: 20; height: 100%; width: 100%; background-repeat:repeat; position:fixed; top: 0px; left: 0px; } but, currently, it fades in... all the way to a solid back, then jumps to the .7 opacity... ideas?

    Read the article

  • Why does my floating div push around other divs?

    - by Meke
    I have a div which has a table which has a google map. I want to place a info box within the google map external to the map, just floating on top But I can't seem to get it right, the info div just pushes around the google map despite being on top of the map... CSS .google_map { height: 270px; width: 100%; } #flightMapInfo { position: relative; float: left; z-index: 100; color: #FFFFFF; top: 30px; left: 50px; background:#5a85a5; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; } div.tabContent { border: 1px solid #c9c3ba; padding: 0.5em; background-color: #f1f0ee; min-height: 300px; } .tableLeft { width: 75%; float: left; border-right: dotted 2px black; } HTML <div class="mapBlock tabContent"> <div id="flightMapInfo">WHARGL</div> <table class="tableLeft"> <tr><td><div id="flightMap" class="google_map"></div> </table></td></tr></div>

    Read the article

  • Drop Down not even showing up in IE6

    - by blackessej
    I've got a drop down menu here that just plain won't show up in IE6. The site works perfectly in every other browser. Seems daft to lose sleep over IE6, I know, but the site is for a demographic who could very well still be using it. Here's the CSS: html { height:100%; } body, p, a, ul, li, ol, h1, h2, h3, h4, h5, h6 { margin:0; padding:0; } body { behavior:url("csshover3.htc"); font-size:14px; font-family:Arial, Helvetica, sans-serif; background-color:#d3d3d3; height:100%; } h1 { font-size:18px; color:#752eca; text-decoration:none; } h2 { font-size:14px; color:#909090; text-decoration:none!important; } p { text-indent:20px; color:#000; } p a { color:#000; text-decoration:underline; } p.foot { text-indent:0px; } p.link { font-size:18px; color:#30F; text-decoration:underline!important; } a { color:#4d2288; text-decoration:none; outline:none; } a:visited { color:#4d2288; } p a:hover { text-decoration:underline!important; } ul#nav { padding:5px; margin:0px auto; width:100%; } ul#nav li a { display:block; font-weight:bold; padding:2px 10px; background:#bacddb; } ul#nav li a:hover { background:#888; color:#fff; } li { list-style:none; float:left; position:relative; width:225px; text-align:center; margin:0px auto; margin-right:4px; border:1px solid #4d2288; } li ul { display:none; position:relative; width:auto; top:0; left:0; margin-left:-1px; } li>ul { top:auto; left:auto; border-top:none; } li:hover ul, li.over ul { display:block; } ul#nav li.current a { background:#b8ab28; } ul#nav li.current a:hover { background:#888; } img { margin:10px 0 5px; } *html img { margin:20px; } .coltextimg { position:relative; float:left; background-position:left bottom; padding:0px 20px 10px 0px; border:none; } #maincontent { width:940px; margin:0px auto; postition:absolute; } *html #maincontent { margin-left:42px; } #header { float:left; width:100%; height:auto!important; height:100%; min-height:100%; margin:0px auto; background-image:url(images/banner_test.jpg); background-repeat:no-repeat; border:2px solid #752eca; -webkit-border-top-left-radius:10px; -webkit-border-top-right-radius:10px; -moz-border-radius-topleft:10px; -moz-border-radius-topright:10px; border-top-left-radius:10px; border-top-right-radius:10px; } .colmask { position:relative; margin-top:160px; clear:both; float:left; width:100%; overflow:hidden; } .colright, .colmid { float:left; width:100%; position:relative; } .col1, .col2 { float:left; position:relative; padding:10px 0 1em 0; overflow:hidden; } .twocol { background:#fff; } .twocol .colmid { right:45%; background:#fff; } .twocol .col1 { width:51%; left:47%; text-align:justify; z-index:0; } .twocol .col2 { width:41%; left:51%; text-align:justify; z-index:0; } .twocol .colimg { border:2px solid #a0a0a0; } .twocol .colvid1 { width:360px; height:240px; } .twocol .colvid2 { width:360px; height:240px; } #footer { text-align:center; font-size:9px; padding:10px 0 1em 0; clear:both; width:100%; height:100%; } *html #footer { height:43px; } #footer p a { text-decoration:none; } #lyr_ddmenu { position:absolute; z-index:1; height:10px; top:120px; float:left; width:1000px; margin:0px auto; padding:5px; } #contact { position:absolute; float:right; font-size:10px; } A.Controls:link { color:#666666; text-decoration:none; font-weight:bold; } A.Controls:visited { color:#666666; text-decoration:none; font-weight:bold; } A.Controls:active { color:#666666; text-decoration:none; font-weight:bold; } A.Controls:hover { color:#be0000; text-decoration:none; font-weight:bold; } And here's the html I'm having the specific problem with: <div id="maincontent"> <div id="header"> <div id="lyr_ddmenu"> <ul id="nav"> <li class="current"><href here...</a> <ul class="sub"> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> </ul></li> <li><href here...</a></li> <ul class="sub"> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> </ul></li> <li><href here...</a></li> <li><href here...</a></li> <ul class="sub"> <li><href here...</a></li> </ul></li> </ul> </div> Thanks!

    Read the article

  • What Are The Ways to Devide Text in Multi-Column? Need an Overview of Possibilities.

    - by Sam
    Hi folks, From source1 and source2 i gather that IE9 will NOT support multi-column css3!! Since it is still the most popular browser (another thing i cannot understand), i am left but no other choice than to use Programming Power to make multi-columns work. Now, I use three divs that float to left, and which are manually filled with text. Please don't laugh i know its stupid! But I would wish to not to have to worry about the columns and just have a one piece of (un-interrupted) text which all goes into only 1 div, and then have a program smart enough to split it up into X equally wide columns. Question: before i start reinvent the wheel, what methods of programming power have you known that tackle this elegantly? Please suggest your best working multi-column layout sources so I can evaluate which option is the best (I will update the below table). Exploring all possibilities 2011 and further, to enable multi column text user experience: Language Author SourceCodeUsage WorksOnAllMajorBrowser? ================================================================================= html manual labour put text manually in separate left-floating divs "Y" // Upside: control! Downside: few changes necessitates to reflow 3 divs manually! CSS3 w3c css3.info/preview/multi-column-layout/ "N" // {-moz-column-count: 3; -webkit-column-count: 3; } Thats all! javascript a list apart will add url soon ? // php ? ? ? //

    Read the article

  • CSS3 Border Radius property doesn't work in localhost?

    - by user547969
    I'm having a very strange problem with css3 border radius property. My following CSS and html works fine with IE9 if i double click the file and open with the IE9 , however if the border property does not work in IE if i open the file through LOCALHOST (xampp insatlled on windows 7). The same file works fine on localhost with other browsers. How can i fix it? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style media="all" type="text/css">@import "circle.css";</style> </head> <body> <div class="exampleborderradiusf">F</div> </body> </html> and the CSS is: .exampleborderradiusf { float:left; background-color: #464646; margin-top: 20px; margin-right: 40px; width: 70px; height: 70px; text-align: center; -moz-border-radius: 35px; border-radius: 35px; color: white; font-size: 20px; position: relative; top: 20px; } Thanks for the help.

    Read the article

  • Applying drop shadows to divs

    - by CJD
    Hi everyone, I need a bit of help applying a drop shadow image to a range of DIV elements. The elements in question already have a background image so I am wrapping another DIV around them. Things get complicated further because I'm also using the 960gs CSS framework. This is my current HTML for a content box type display: <div class="grid_12 boxout-shadow-920"> <div class="boxout"> <p>planetCJD.co.uk is the personal site and blog of CJD. The site is still a work-in-progress but please do have a look around and let me know what you think! </p> </div> </div> Boxout CSS: .boxout { background:url("../images/overlay.png") repeat-x scroll 0 0 #EEEEEE; -moz-border-radius:4px 4px 4px 4px; border:1px solid #DDDDDD; margin-bottom:15px; padding:5px; } boxout-shadow-920 CSS: .boxout-shadow-920 { background:url("../images/box-shadow-920.png") no-repeat scroll 50% 101% transparent; } Now this works to a degree. The boxshadow image shows at the bottom of the content box which is what I would like. However as I'm using a fixed percentage of 101%, if the content box height is too small, not much of the drop shadow image gets shown, and if the content box is too big, whitespace starts to appear between the box and the shadow image. So anyway, what I'm looking for is a cross-browser CSS based solution for doing this properly. I'm sure there is an easy answer to this - any help is appreciated!

    Read the article

  • drop down menu will not display outside containing div in IE7..

    - by playahabana
    I am tearing my hair out over this, I have a dropdown menu using CSS and jQuery (thanks to Soh Tanaka) and it works perfectly in Firefox, Safari, Google chrome and I.E. 8, but in IE 7 it will not drop down outside the 'Banner div'. It drops below the nav div however. I have moved the nav div higher in the banner the result is the same, menu drops until it reaches the border of the banner div and then vanishes.... Below is the css. This is my first website and I have some limited understanding of what I am doing. The drop down menu includes transparent png's as links (I know, I know...but it's what the Boss wants...) please could someone take a quick scan at the below CSS and let me know what is wroong? Is this some form of the IE z-index bug? i have tried all different combinations of z-index and still I can't get a different result. . The html is below as well. Thankyou in advance #banner { position: relative; width: 62.5em; height: 12em; background-color: #46280A; background-image: url('images/includes/banner2.jpg'); background-repeat: no-repeat; background-position: center; -moz-box-shadow: -4px 6px 8px #000; -webkit-box-shadow: -4px 6px 8px #000; box-shadow: -4px 6px 8px #000; /* For IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=8, Direction=225, Color='#000000')"; /* For IE 5.5 - 7 */ filter: progid:DXImageTransform.Microsoft.Shadow(Strength=8, Direction=225, Color='#000000'); z-index: 1; } /*------------------------------------SCROLLER---------------------------------------------*/ #headlines{ position: absolute; top: 1.3em; right: 2.75em; overflow: hidden; height: 2.5em; width: 24em; background-color: #000000; display: block; z-index: 3; } #news{ position: relative; height: 3.1em; line-height: 2.5em; font-size: 0.8em color: #FFFF99; white-space: nowrap; overflow: hidden; font-family: Georgia,Arial; } #scrollerglass{ position: absolute; top: 0.95em; right: 2em; height: 52px; width: 410px; border: none; padding: 0.2em 0em 0em 0em; line-height: 0.7em; text-align: center; background-image: url('images/includes/scrollerglass.png'); background-color: transparent; background-repeat: no-repeat; background-position: center; opacity: 20; z-index: 10; } #scrollerglass a i { visibility: hiddn ; } /-------------------------------------NAVIGATION-----------------------------------------/ #nav { position: absolute; top: 5.8em; left: 0.2em; font-family: trebuchet, sans-serif; font-size: 1em; line-height: 3.75em; text-align: center; color: #FFFF00; z-index: 3; } ul.navlist { list-style: none; padding: 0em; margin: 1em; float: left; width: 62.5em; background: transparent; font-size: 1em; } ul.navlist li { position: relative; /*--Declare X and Y axis base for sub navigation--*/ float: left; margin: 0em 1.4em; padding: 0em 0.7em 0em 0em; z-index: 1; } ul.navlist li a{ display: block; text-decoration: none; float: left; border: 0px solid; } ul.navlist li img{ border: 0px solid; } ul.navlist li span { trigger styles--*/ width: 1.2em; height: 5.25em; float: left; background: url(images/links/downlogo.png) no-repeat center top; } ul.navlist li span.subhover { background-position: center bottom; cursor: pointer; } ul.navlist li ul.navdrop { list-style: none; position: absolute; float: left; top: 5.3em; left: -2.4em; height: 15.0em; width: 11.25em; margin: 0; padding: 0.5em 0em 0em 0em; display: none; background-position: center; background-image: url('images/includes/slider.jpg'); background-color: transparent; background-repeat: no-repeat; -moz-box-shadow: -4px 6px 8px #000; -webkit-box-shadow: -4px 6px 8px #000; box-shadow: -4px 6px 8px #000; /* For IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=8, Direction=225, Color='#000000')"; /* For IE 5.5 - 7 */ filter: progid:DXImageTransform.Microsoft.Shadow(Strength=8, Direction=225, Color='#000000'); z-index:1; } ul.navlist li ul.navdrop li{ margin: 0em 2.3em 0em 0em; padding: 1em 0em 0em 0em; width: 8em; clear: both; } html ul.navlist li ul.navdrop li a { border: 0px solid; width: 11.25em; } html ul.navlist li ul.navdrop li a:hover { background: transparent; } <div id="banner"> <div id="headlines"> <div id="news"> Whatever we want to promote </div> </div> <div id="scrollerglass"> <a href="vintagecigars.php"> <i>------s-c-r-o-l-l-e-r - - - -l-i-n-k-s--------<br /> <br>------s-c-r-o-l-l-e-r - - - -l-i-n-k-s------</i></a> </div> <div id="nav"> <ul class="navmenu"> <li><a href="index.php"><img src="images/links/home.png" alt="Home" ></a></li> <li><a href="ourbar.php"><img src="images/links/ourbar.png" alt="Our Bar" ></a> <ul class="navdrop"> <li ><a href="ourcocktails.php"><img src="images/links/cockteles.png" alt="Our Cocktails" ></a></li> <li ><a href="celebrate.php"><img src="images/links/celebrate.png" alt="Celebrate in Style" ></a></li> </ul> </li> <li><a href="ourcigars.php"><img src="images/links/ourcigars.png" alt="Our Cigars" ></a> <ul class="navdrop"> <li ><a href="edicioneslimitadas.php"><img src="images/links/edicioneslimitadas.png" alt="Edition Limitadas" ></a></li> <li ><a href="cigartasting.php"><img src="images/links/cigartasting.png" alt="Cigar Tastings" ></a></li> </ul> </li> <li><a href="personalroller.php"><img src="images/links/personalcigar.png" alt="Personal Cigar Roller" ></a></li> <li><a href="galleryentrance.php"><img src="images/links/photogallery.png" alt="Photo Gallery" ></a></li> <li><a href="contactus.php"><img src="images/links/contactus.png" alt="Contact Us" ></a></li> </ul></div></div><!--end banner-->

    Read the article

  • Client-side user custom CSS single file for overriding multiple domains

    - by Cawas
    This is for using in Safari, though it could probably be used on Firefox as well. In Chrome you have to add a plugin anyway (which generally allow for custom CSS per domain), and Opera already allows this to be done without needing any CSS. But while it's for customizing on the client-side, it's also a pure CSS question. So I'm using no plugins here. So, again, I got a custom CSS code (easily) working for all domains. Now I want to get specify CSS code for each domain. All with just 1 CSS file that's being loaded by Safari. Over the web and googling, I've found two ways to supposedly do this, but none actually worked. They're both documented on userstyles.com: @-moz-document domain("your-domain.com") { }. This would be perfect, since I can have several tags like that and just choose which style will be loaded for which domain. It just doesn't work. @namespace is quite confusing and I've tried every variation I could think of. None worked.

    Read the article

  • Cross-browser curved borders

    - by Gandalf StormCrow
    What is the best way to achieve cross-browser(ff,ie6,chrome,opera,safari) curved corners on a div. I found this article http://jonraasch.com/blog/css-rounded-corners-in-all-browsers and I've followed instructions step by step multiple times, here is my css : #content_wrapper{ -moz-border-radius:25px 25px 25px 25px; -webkit-border-radius: 25px; -khtml-border-radius: 25px; border-radius: 25px; background-color:#F2DADC; border:25px solid #ECD3D5; height:780px; opacity:0.7; width:747px; margin:0px auto; position:relative; display:block; zoom:1; } <!--[if lte IE 8]> <style> #content_wrapper{ behavior: url(template/css/border-radius.htc); border-radius: 20px; } </style> <![endif]--> Can somebody point me what am I doing wrong or is there a better way to achieve the same effect, its working in all browsers except in IE

    Read the article

  • jquery animate boxshadow

    - by mstef
    http://jsfiddle.net/mstefanko/w5aAn/877/ Below, i'm achieving the effect I wanted, but with a pending issue. Since i'm using a separate span and positioning it absolute over-top of a box with relative position. I can not access the inputs until after the animation is finished. I'm guessing the only way to alleviate this would be do something similar with just animating the border of the outer box? But nothing I was doing to animate box-shadow:inset was working. HTML <div id="wow"> <span id="pulse"></span> <input id="form-input"/> <input id="form-input"/> </div>? CSS #wow { width: 500px; height: 200px; display: inline-block; position: relative; border: 1px solid black; } #pulse { width: 100%; height: 100%; box-shadow:inset 0 0 20px #6c95c3; -moz-box-shadow:inset 0 0 10px #6c95c3; position: absolute; z-index: 20000; } JS $('#pulse').stop().animate({"opacity": 0}, "fast"); $('#pulse').effect("pulsate", { times:4 }, 500, function() { $(this).remove(); });

    Read the article

  • Why does this CSS button mess with <a> tags?

    - by Ian McCullough
    Here is my CSS button { border: 0 none; cursor: pointer; padding: 0 15px 0 0; text-align: center; height: 30px; line-height: 30px; width: auto; } button a { color:white; text-decoration:none; } button.rounded { background: transparent url(/images/button/btn_right.png) no-repeat scroll right top; clear: left; font-size: 0.8em; } button span { display: block; padding: 0 0 0 15px; position: relative; white-space: nowrap; height: 30px; line-height: 30px; } button.rounded span { background: transparent url(/images/button/btn_left.png) no-repeat scroll left top; color: #FFFFFF; } button.rounded:hover { background-position: 100% -30px; } button.rounded:hover span { background-position: 0% -30px; } button::-moz-focus-inner { border: none; } Here is the code for my "button" with a link in it. <button class="rounded"><span><a href="profile.php">Profile</a></span></button> The issue is it does not link to the href when i click on it. Anyone know why?

    Read the article

  • Fit into div in CSS

    - by Teodoris
    Hello everyone my menu bar can't fit into my <div> area at different browser. I have checked with Opera and Chrome it looks fine but with Explorer and Firefox my menu can't fit. And my menu is in this <div> tag: .page { width: 964px; margin-left: auto; margin-right: auto; background-image:url(../images2/images/orta_alan_bg_GOLGE.png); background-repeat:repeat-y; } Here is my menu: ul#menu { padding: 0 0 2px; position: relative; margin: 0; text-align: center; } ul#menu li { display: inline; list-style: none; font-family: 'Museo300Regular'; font-size:17px; font-style:normal; } ul#menu li a { background-image:url(../../images2/images/menu_bg_normal.jpg); background-repeat: repeat; padding: 5px 19px 5px; font-weight: normal; text-decoration: none; line-height: 2.8em; background-color: #e8eef4; color: #FEFEFF; border-radius: 4px 4px 0 0; -webkit-border-radius: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; cursor:pointer; } So what is the problem why it can't fit into with Explorer and Firefox? I attach an image you can understand what I mean Here is the Chrome and Opera it can fit

    Read the article

  • Dropdown menu not showing when using position: absolute;

    - by Xiy
    I've just turned my website into a responsive layout and along the way I've somehow managed to make my dropdown menus not work. When hovering over 'Drop-downs' they don't display unless I'm using position: relative. They worked before using position: absolute - but it seems they only work with position relative now. When using relative it uses the width which messes up the navigation bar. Using relative: http://d.pr/i/tp5R Using absolute: http://d.pr/i/j7r1 CSS for my sub-menu div.left_first_header ul.sub-menu { width: 125px; top: 14px; z-index: 2; height: 100%; position: absolute; -webkit-border-radius: 0px 0px 4px 4px; -moz-border-radius: 0px 0px 4px 4px; background: url(images/drop_down_bg.jpg); padding-left: 15px; padding-right: 15px; background-repeat: repeat; } jQuery for the drop down functionality jQuery(document).ready(function ($) { jQuery("ul.dropdown li").hover(function() { $('ul:first',this).css('visibility', 'visible'); }, function() { jQuery(this).removeClass("hover"); jQuery('ul:first',this).css('visibility', 'hidden'); }); }); My website http://wpvault.com/kahlam/ Considering it's 4am I've probably made a really stupid simple mistake. I apologise if I've missed anything.

    Read the article

  • jQuery 1.4 Opacity and IE Filters

    - by Rick Strahl
    Ran into a small problem today with my client side jQuery library after switching to jQuery 1.4. I ran into a problem with a shadow plugin that I use to provide drop shadows for absolute elements – for Mozilla WebKit browsers the –moz-box-shadow and –webkit-box-shadow CSS attributes are used but for IE a manual element is created to provide the shadow that underlays the original element along with a blur filter to provide the fuzziness in the shadow. Some of the key pieces are: var vis = el.is(":visible"); if (!vis) el.show(); // must be visible to get .position var pos = el.position(); if (typeof shEl.style.filter == "string") sh.css("filter", 'progid:DXImageTransform.Microsoft.Blur(makeShadow=true, pixelradius=3, shadowOpacity=' + opt.opacity.toString() + ')'); sh.show() .css({ position: "absolute", width: el.outerWidth(), height: el.outerHeight(), opacity: opt.opacity, background: opt.color, left: pos.left + opt.offset, top: pos.top + opt.offset }); This has always worked in previous versions of jQuery, but with 1.4 the original filter no longer works. It appears that applying the opacity after the original filter wipes out the original filter. IOW, the opacity filter is not applied incrementally, but absolutely which is a real bummer. Luckily the workaround is relatively easy by just switching the order in which the opacity and filter are applied. If I apply the blur after the opacity I get my correct behavior back with both opacity: sh.show() .css({ position: "absolute", width: el.outerWidth(), height: el.outerHeight(), opacity: opt.opacity, background: opt.color, left: pos.left + opt.offset, top: pos.top + opt.offset }); if (typeof shEl.style.filter == "string") sh.css("filter", 'progid:DXImageTransform.Microsoft.Blur(makeShadow=true, pixelradius=3, shadowOpacity=' + opt.opacity.toString() + ')'); While this works this still causes problems in other areas where opacity is implicitly set in code such as for fade operations or in the case of my shadow component the style/property watcher that keeps the shadow and main object linked. Both of these may set the opacity explicitly and that is still broken as it will effectively kill the blur filter. This seems like a really strange design decision by the jQuery team, since clearly the jquery css function does the right thing for setting filters. Internally however, the opacity setting doesn’t use .css instead hardcoding the filter which given jQuery’s usual flexibility and smart code seems really inappropriate. The following is from jQuery.js 1.4: var style = elem.style || elem, set = value !== undefined; // IE uses filters for opacity if ( !jQuery.support.opacity && name === "opacity" ) { if ( set ) { // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level style.zoom = 1; // Set the alpha filter to set the opacity var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"; var filter = style.filter || jQuery.curCSS( elem, "filter" ) || ""; style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity; } return style.filter && style.filter.indexOf("opacity=") >= 0 ? (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "": ""; } You can see here that the style is explicitly set in code rather than relying on $.css() to assign the value resulting in the old filter getting wiped out. jQuery 1.32 looks a little different: // IE uses filters for opacity if ( !jQuery.support.opacity && name == "opacity" ) { if ( set ) { // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level elem.zoom = 1; // Set the alpha filter to set the opacity elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) + (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); } return elem.filter && elem.filter.indexOf("opacity=") >= 0 ? (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '': ""; } Offhand I’m not sure why the latter works better since it too is assigning the filter. However, when checking with the IE script debugger I can see that there are actually a couple of filter tags assigned when using jQuery 1.32 but only one when I use jQuery 1.4. Note also that the jQuery 1.3 compatibility plugin for jQUery 1.4 doesn’t address this issue either. Resources ww.jquery.js (shadow plug-in $.fn.shadow) © Rick Strahl, West Wind Technologies, 2005-2010Posted in jQuery  

    Read the article

  • ADF version of "Modern" dialog windows

    - by Martin Deh
    It is no surprise with the popularity of the i-devices (iphone, ipad), that many of the iOS UI based LnF (look and feel) would start to inspire web designers to incorporate the same LnF into their web sites.  Take for example, a normal dialog popup.  In the iOS world, the LnF becomes a bit more elegant by add just a simple element as a "floating" close button: In this blog post, I will describe how this can be accomplished using OOTB ADF components and CSS3 style elements. There are two ways that this can be achieved.  The easiest way is to simply replace the default image, which looks like this, and adjust the af|panelWindow:close-icon-style skin selector.   Using this simple technique, you can come up with this: The CSS code to produce this effect is pretty straight forward: af|panelWindow.test::close-icon-style{    background-image: url("../popClose.gif");    line-height: 10px;    position: absolute;    right: -10px;    top: -10px;    height:38px;    width:38px;    outline:none; } You can see from the CSS, the position of the region, which holds the image, is relocated based on the position based attributes.  Also, the addition of the "outline" attribute removes the border that is visible in Chrome and IE.  The second example, is based on not having an image to produce the close button.  Like the previous sample, I will use the OOTB panelWindow.  However, this time I will use a OOTB commandButton to replace the image.  The construct of the components looks like this: The commandButton is positioned first in the hierarchy making the re-positioning easier.  The commandButton will also need a style class assigned to it (i.e. closeButton), which will allow for the positioning and the over-riding of the default skin attributes of a default button.  In addition, the closeIconVisible property is set to false, since the default icon is no longer needed.  Once this is done, the rest is in the CSS.  Here is the sample that I created that was used for an actual customer POC: The CSS code for the button: af|commandButton.closeButton, af|commandButton.closeButton af|commandButton:text-only{     line-height: 10px;     position: absolute;     right: -10px;     top: -10px;     -webkit-border-radius: 70px;     -moz-border-radius: 70px;     -ms-border-radius: 70px;     border-radius: 70px;     background-image:none;     border:#828c95 1px solid;     background-color:black;     font-weight: bold;     text-align: center;     text-decoration: none;     color:white;     height:30px;     width:30px;     outline:none; } The CSS uses the border radius to create the round effect on the button (in IE 8, since border-radius is not supported, this will only work with some added code). Also, I add the box-shadow attribute to the panelWindow style class to give it a nice shadowing effect.

    Read the article

  • IE8 positioning, nightmare!

    - by Kyle Sevenoaks
    Well hi, guess what, I have an IE positioning issue! This is in 8, so god know what's going on in the other versions (checking later) Both the boxes call the same class, why is IE being so difficult? Here's how it's meant to look: And here's how it does look: CSS: (removed comments for ease of reading) div .roundbigboxkunde { background-image:url(../../upload/EW_kunde_info.png); background-position:top center; padding:10px; padding-top:10px; padding-bottom:20px; width:560px; height:1%; border-width:1px; border-color:#dddddd; border-radius:10px; -moz-border-radius:10px; -webkit-border-radius:10px; z-index:1; position:relative; overflow:hidden; } div .roundbigboxkundei { margin-top:10px; padding:10px; padding-top:10px; padding-bottom:10px; width:760px; height:1%; position:relative; overflow:hidden; And HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <div class="roundbigboxkunde"> <div class="roundbigboxkundei"> <p id="nyk">&nbsp;</p> <div id="bg_box2"></div> <p class="required"> <label for="billing_firstName"><span class="label">Fornavn:</span></label> <fieldset class="error"><input name="billing_firstName" class="text" type="text" value="Kyle"/> <div class="errorText hidden"></div> </fieldset> </p> CONTENT CONTINUES </fieldset> Here is the page

    Read the article

  • how to change a button into a imagebutton in asp.net c#

    - by sweetsecret
    How to change the button into image button... the button in the beginning has "Pick a date" when clicked a calender pops out and the when a date is selected a label at the bottom reading the date comes in and the text on the button changes to disabled... i want to palce a imagebutton having a image icon of the calender and rest of the function will be the same.... the code as follows: using System; using System.Collections.Generic; using System.ComponentModel; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; [assembly: TagPrefix("DatePicker", "EWS")] namespace EclipseWebSolutions.DatePicker { [DefaultProperty("Text")] [ToolboxData("<{0}:DatePicker runat=server")] [DefaultEvent("SelectionChanged")] [ValidationProperty("TextValue")] public class DatePicker : WebControl, INamingContainer { #region Properties public TextBox txtDate = new TextBox(); public Calendar calDate = new Calendar(); public Button btnDate = new Button(); public Panel pnlCalendar = new Panel(); private enum ViewStateConstants { ValidationGroup, RegularExpression, ErrorMessage, RegExText, CalendarPosition, FormatString, ExpandLabel, CollapseLabel, ApplyDefaultStyle, CausesValidation, } /// <summary> /// Defines the available display modes of this calendar. /// </summary> public enum CalendarDisplay { DisplayRight, DisplayBelow } /// <summary> /// Where to display the popup calendar. /// </summary> [Category("Behaviour")] [Localizable(true)] public CalendarDisplay CalendarPosition { get { if (ViewState[ViewStateConstants.CalendarPosition.ToString()] == null) { ViewState[ViewStateConstants.CalendarPosition.ToString()] = CalendarDisplay.DisplayRight; } return (CalendarDisplay)ViewState[ViewStateConstants.CalendarPosition.ToString()]; } set { ViewState[ViewStateConstants.CalendarPosition.ToString()] = value; } } /// <summary> /// Text version of the control's value, for use by ASP.NET validators. /// </summary> public string TextValue { get { return txtDate.Text; } } /// <summary> /// Holds the current date value of this control. /// </summary> [Category("Behaviour")] [Localizable(true)] [Bindable(true, BindingDirection.TwoWay)] public DateTime DateValue { get { try { if (txtDate.Text == "") return DateTime.MinValue; DateTime val = DateTime.Parse(txtDate.Text); return val; } catch (ArgumentNullException) { return DateTime.MinValue; } catch (FormatException) { return DateTime.MinValue; } } set { if (value == DateTime.MinValue) { txtDate.Text = ""; } else { txtDate.Text = value.ToShortDateString(); } } } [Category("Behavior"), Themeable(false), DefaultValue("")] public virtual string ValidationGroup { get { if (ViewState[ViewStateConstants.ValidationGroup.ToString()] == null) { return string.Empty; } else { return (string)ViewState[ViewStateConstants.ValidationGroup.ToString()]; } } set { ViewState[ViewStateConstants.ValidationGroup.ToString()] = value; } } /// <summary> /// The label of the exand button. Shown when the calendar is hidden. /// </summary> [Bindable(true)] [Category("Appearance")] [DefaultValue("PickDate")] [Localizable(true)] public string ExpandButtonLabel { get { String s = (String)ViewState[ViewStateConstants.ExpandLabel.ToString()]; return ((s == null) ? "PickDate" : s); } set { ViewState[ViewStateConstants.ExpandLabel.ToString()] = value; } } /// <summary> /// The label of the collapse button. Shown when the calendar is visible. /// </summary> [Bindable(true)] [Category("Appearance")] [DefaultValue("Disabled")] [Localizable(true)] public string CollapseButtonLabel { get { String s = (String)ViewState[ViewStateConstants.CollapseLabel.ToString()]; return ((s == null) ? "Disabled" : s); } set { ViewState[ViewStateConstants.CollapseLabel.ToString()] = value; } } /// <summary> /// Whether to apply the default style. Disable this if you want to apply a custom style, or to use themes and skins /// to style the control. /// </summary> [Category("Appearance")] [DefaultValue(true)] [Localizable(true)] public bool ApplyDefaultStyle { get { if (ViewState[ViewStateConstants.ApplyDefaultStyle.ToString()] == null) { ViewState[ViewStateConstants.ApplyDefaultStyle.ToString()] = true; } return (bool)ViewState[ViewStateConstants.ApplyDefaultStyle.ToString()]; } set { ViewState[ViewStateConstants.ApplyDefaultStyle.ToString()] = value; } } /// <summary> /// Causes Validation /// </summary> [Category("Appearance")] [DefaultValue(false)] [Localizable(false)] public bool CausesValidation { get { if (ViewState[ViewStateConstants.CausesValidation.ToString()] == null) { ViewState[ViewStateConstants.CausesValidation.ToString()] = false; } return (bool)ViewState[ViewStateConstants.CausesValidation.ToString()]; } set { ViewState[ViewStateConstants.CausesValidation.ToString()] = value; btnDate.CausesValidation = value; } } #endregion #region Events /// <summary> /// A day was selected from the calendar control. /// </summary> public event EventHandler SelectionChanged; protected virtual void OnSelectionChanged() { if (SelectionChanged != null) // only raise the event if someone is listening. { SelectionChanged(this, EventArgs.Empty); } } #endregion #region Event Handlers /// <summary> /// The +/- button was clicked. /// </summary> protected void btnDate_Click(object sender, System.EventArgs e) { if (!calDate.Visible) { // expand the calendar calDate.Visible = true; txtDate.Enabled = false; btnDate.Text = CollapseButtonLabel; if (DateValue != DateTime.MinValue) { calDate.SelectedDate = DateValue; calDate.VisibleDate = DateValue; } } else { // collapse the calendar calDate.Visible = false; txtDate.Enabled = true; btnDate.Text = ExpandButtonLabel; } } /// <summary> /// A date was selected from the calendar. /// </summary> protected void calDate_SelectionChanged(object sender, System.EventArgs e) { calDate.Visible = false; txtDate.Visible = true; btnDate.Text = ExpandButtonLabel; txtDate.Enabled = true; txtDate.Text = calDate.SelectedDate.ToShortDateString(); OnSelectionChanged(); } #endregion /// <summary> /// Builds the contents of this control. /// </summary> protected override void CreateChildControls() { btnDate.Text = ExpandButtonLabel; btnDate.CausesValidation = CausesValidation; txtDate.ID = "txtDate"; calDate.Visible = false; if (ApplyDefaultStyle) { calDate.BackColor = System.Drawing.Color.White; calDate.BorderColor = System.Drawing.Color.FromArgb(10066329); calDate.CellPadding = 2; calDate.DayNameFormat = DayNameFormat.Shortest; calDate.Font.Name = "Verdana"; calDate.Font.Size = FontUnit.Parse("8pt"); calDate.ForeColor = System.Drawing.Color.Black; calDate.Height = new Unit(150, UnitType.Pixel); calDate.Width = new Unit(180, UnitType.Pixel); calDate.DayHeaderStyle.BackColor = System.Drawing.Color.FromArgb(228, 228, 228); calDate.DayHeaderStyle.Font.Size = FontUnit.Parse("7pt"); calDate.TitleStyle.Font.Bold = true; calDate.WeekendDayStyle.BackColor = System.Drawing.Color.FromArgb(255, 255, 204); } ConnectEventHandlers(); pnlCalendar.Controls.Add(calDate); pnlCalendar.Style["position"] = "absolute"; pnlCalendar.Style["filter"] = "alpha(opacity=95)"; pnlCalendar.Style["-moz-opacity"] = ".95"; pnlCalendar.Style["opacity"] = ".95"; pnlCalendar.Style["z-index"] = "2"; pnlCalendar.Style["background-color"] = "White"; if (CalendarPosition == CalendarDisplay.DisplayBelow) { pnlCalendar.Style["margin-top"] = "27px"; } else { pnlCalendar.Style["display"] = "inline"; } Controls.Add(txtDate); Controls.Add(pnlCalendar); Controls.Add(btnDate); base.CreateChildControls(); } /// <summary> /// Render the contents of this control. /// </summary> /// <param name="output">The HtmlTextWriter to use.</param> protected override void RenderContents(HtmlTextWriter output) { switch (CalendarPosition) { case CalendarDisplay.DisplayRight: { txtDate.RenderControl(output); btnDate.RenderControl(output); pnlCalendar.RenderControl(output); break; } case CalendarDisplay.DisplayBelow: { pnlCalendar.RenderControl(output); txtDate.RenderControl(output); btnDate.RenderControl(output); break; } } } /// <summary> /// Connect event handlers to events. /// </summary> private void ConnectEventHandlers() { btnDate.Click += new System.EventHandler(btnDate_Click); calDate.SelectionChanged += new System.EventHandler(calDate_SelectionChanged); } } } using System; using System.Collections.Generic; using System.ComponentModel; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; [assembly: TagPrefix("DatePicker", "EWS")] namespace EclipseWebSolutions.DatePicker { [DefaultProperty("Text")] [ToolboxData("<{0}:DatePicker runat=server")] [DefaultEvent("SelectionChanged")] [ValidationProperty("TextValue")] public class DatePicker : WebControl, INamingContainer { #region Properties public TextBox txtDate = new TextBox(); public Calendar calDate = new Calendar(); public Button btnDate = new Button(); public Panel pnlCalendar = new Panel(); private enum ViewStateConstants { ValidationGroup, RegularExpression, ErrorMessage, RegExText, CalendarPosition, FormatString, ExpandLabel, CollapseLabel, ApplyDefaultStyle, CausesValidation, } /// <summary> /// Defines the available display modes of this calendar. /// </summary> public enum CalendarDisplay { DisplayRight, DisplayBelow } /// <summary> /// Where to display the popup calendar. /// </summary> [Category("Behaviour")] [Localizable(true)] public CalendarDisplay CalendarPosition { get { if (ViewState[ViewStateConstants.CalendarPosition.ToString()] == null) { ViewState[ViewStateConstants.CalendarPosition.ToString()] = CalendarDisplay.DisplayRight; } return (CalendarDisplay)ViewState[ViewStateConstants.CalendarPosition.ToString()]; } set { ViewState[ViewStateConstants.CalendarPosition.ToString()] = value; } } /// <summary> /// Text version of the control's value, for use by ASP.NET validators. /// </summary> public string TextValue { get { return txtDate.Text; } } /// <summary> /// Holds the current date value of this control. /// </summary> [Category("Behaviour")] [Localizable(true)] [Bindable(true, BindingDirection.TwoWay)] public DateTime DateValue { get { try { if (txtDate.Text == "") return DateTime.MinValue; DateTime val = DateTime.Parse(txtDate.Text); return val; } catch (ArgumentNullException) { return DateTime.MinValue; } catch (FormatException) { return DateTime.MinValue; } } set { if (value == DateTime.MinValue) { txtDate.Text = ""; } else { txtDate.Text = value.ToShortDateString(); } } } [Category("Behavior"), Themeable(false), DefaultValue("")] public virtual string ValidationGroup { get { if (ViewState[ViewStateConstants.ValidationGroup.ToString()] == null) { return string.Empty; } else { return (string)ViewState[ViewStateConstants.ValidationGroup.ToString()]; } } set { ViewState[ViewStateConstants.ValidationGroup.ToString()] = value; } } /// <summary> /// The label of the exand button. Shown when the calendar is hidden. /// </summary> [Bindable(true)] [Category("Appearance")] [DefaultValue("PickDate")] [Localizable(true)] public string ExpandButtonLabel { get { String s = (String)ViewState[ViewStateConstants.ExpandLabel.ToString()]; return ((s == null) ? "PickDate" : s); } set { ViewState[ViewStateConstants.ExpandLabel.ToString()] = value; } } /// <summary> /// The label of the collapse button. Shown when the calendar is visible. /// </summary> [Bindable(true)] [Category("Appearance")] [DefaultValue("Disabled")] [Localizable(true)] public string CollapseButtonLabel { get { String s = (String)ViewState[ViewStateConstants.CollapseLabel.ToString()]; return ((s == null) ? "Disabled" : s); } set { ViewState[ViewStateConstants.CollapseLabel.ToString()] = value; } } /// <summary> /// Whether to apply the default style. Disable this if you want to apply a custom style, or to use themes and skins /// to style the control. /// </summary> [Category("Appearance")] [DefaultValue(true)] [Localizable(true)] public bool ApplyDefaultStyle { get { if (ViewState[ViewStateConstants.ApplyDefaultStyle.ToString()] == null) { ViewState[ViewStateConstants.ApplyDefaultStyle.ToString()] = true; } return (bool)ViewState[ViewStateConstants.ApplyDefaultStyle.ToString()]; } set { ViewState[ViewStateConstants.ApplyDefaultStyle.ToString()] = value; } } /// <summary> /// Causes Validation /// </summary> [Category("Appearance")] [DefaultValue(false)] [Localizable(false)] public bool CausesValidation { get { if (ViewState[ViewStateConstants.CausesValidation.ToString()] == null) { ViewState[ViewStateConstants.CausesValidation.ToString()] = false; } return (bool)ViewState[ViewStateConstants.CausesValidation.ToString()]; } set { ViewState[ViewStateConstants.CausesValidation.ToString()] = value; btnDate.CausesValidation = value; } } #endregion #region Events /// <summary> /// A day was selected from the calendar control. /// </summary> public event EventHandler SelectionChanged; protected virtual void OnSelectionChanged() { if (SelectionChanged != null) // only raise the event if someone is listening. { SelectionChanged(this, EventArgs.Empty); } } #endregion #region Event Handlers /// <summary> /// The +/- button was clicked. /// </summary> protected void btnDate_Click(object sender, System.EventArgs e) { if (!calDate.Visible) { // expand the calendar calDate.Visible = true; txtDate.Enabled = false; btnDate.Text = CollapseButtonLabel; if (DateValue != DateTime.MinValue) { calDate.SelectedDate = DateValue; calDate.VisibleDate = DateValue; } } else { // collapse the calendar calDate.Visible = false; txtDate.Enabled = true; btnDate.Text = ExpandButtonLabel; } } /// <summary> /// A date was selected from the calendar. /// </summary> protected void calDate_SelectionChanged(object sender, System.EventArgs e) { calDate.Visible = false; txtDate.Visible = true; btnDate.Text = ExpandButtonLabel; txtDate.Enabled = true; txtDate.Text = calDate.SelectedDate.ToShortDateString(); OnSelectionChanged(); } #endregion /// <summary> /// Builds the contents of this control. /// </summary> protected override void CreateChildControls() { btnDate.Text = ExpandButtonLabel; btnDate.CausesValidation = CausesValidation; txtDate.ID = "txtDate"; calDate.Visible = false; if (ApplyDefaultStyle) { calDate.BackColor = System.Drawing.Color.White; calDate.BorderColor = System.Drawing.Color.FromArgb(10066329); calDate.CellPadding = 2; calDate.DayNameFormat = DayNameFormat.Shortest; calDate.Font.Name = "Verdana"; calDate.Font.Size = FontUnit.Parse("8pt"); calDate.ForeColor = System.Drawing.Color.Black; calDate.Height = new Unit(150, UnitType.Pixel); calDate.Width = new Unit(180, UnitType.Pixel); calDate.DayHeaderStyle.BackColor = System.Drawing.Color.FromArgb(228, 228, 228); calDate.DayHeaderStyle.Font.Size = FontUnit.Parse("7pt"); calDate.TitleStyle.Font.Bold = true; calDate.WeekendDayStyle.BackColor = System.Drawing.Color.FromArgb(255, 255, 204); } ConnectEventHandlers(); pnlCalendar.Controls.Add(calDate); pnlCalendar.Style["position"] = "absolute"; pnlCalendar.Style["filter"] = "alpha(opacity=95)"; pnlCalendar.Style["-moz-opacity"] = ".95"; pnlCalendar.Style["opacity"] = ".95"; pnlCalendar.Style["z-index"] = "2"; pnlCalendar.Style["background-color"] = "White"; if (CalendarPosition == CalendarDisplay.DisplayBelow) { pnlCalendar.Style["margin-top"] = "27px"; } else { pnlCalendar.Style["display"] = "inline"; } Controls.Add(txtDate); Controls.Add(pnlCalendar); Controls.Add(btnDate); base.CreateChildControls(); } /// <summary> /// Render the contents of this control. /// </summary> /// <param name="output">The HtmlTextWriter to use.</param> protected override void RenderContents(HtmlTextWriter output) { switch (CalendarPosition) { case CalendarDisplay.DisplayRight: { txtDate.RenderControl(output); btnDate.RenderControl(output); pnlCalendar.RenderControl(output); break; } case CalendarDisplay.DisplayBelow: { pnlCalendar.RenderControl(output); txtDate.RenderControl(output); btnDate.RenderControl(output); break; } } } /// <summary> /// Connect event handlers to events. /// </summary> private void ConnectEventHandlers() { btnDate.Click += new System.EventHandler(btnDate_Click); calDate.SelectionChanged += new System.EventHandler(calDate_SelectionChanged); } } } <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" % <%@ Register Assembly="EclipseWebSolutions.DatePicker" Namespace="EclipseWebSolutions.DatePicker" TagPrefix="ews" % Untitled Page       using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void DatePicker1_SelectionChanged(object sender, EventArgs e) { Label1.Text = DatePicker1.DateValue.ToShortDateString(); pnlLabel.Update(); } }

    Read the article

  • Solving the NP-complete problem in XKCD

    - by Adam Tuttle
    The problem/comic in question: http://xkcd.com/287/ I'm not sure this is the best way to do it, but here's what I've come up with so far. I'm using CFML, but it should be readable by anyone. <cffunction name="testCombo" returntype="boolean"> <cfargument name="currentCombo" type="string" required="true" /> <cfargument name="currentTotal" type="numeric" required="true" /> <cfargument name="apps" type="array" required="true" /> <cfset var a = 0 /> <cfset var found = false /> <cfloop from="1" to="#arrayLen(arguments.apps)#" index="a"> <cfset arguments.currentCombo = listAppend(arguments.currentCombo, arguments.apps[a].name) /> <cfset arguments.currentTotal = arguments.currentTotal + arguments.apps[a].cost /> <cfif arguments.currentTotal eq 15.05> <!--- print current combo ---> <cfoutput><strong>#arguments.currentCombo# = 15.05</strong></cfoutput><br /> <cfreturn true /> <cfelseif arguments.currentTotal gt 15.05> <cfoutput>#arguments.currentCombo# > 15.05 (aborting)</cfoutput><br /> <cfreturn false /> <cfelse> <!--- less than 15.05 ---> <cfoutput>#arguments.currentCombo# < 15.05 (traversing)</cfoutput><br /> <cfset found = testCombo(arguments.currentCombo, arguments.currentTotal, arguments.apps) /> </cfif> </cfloop> </cffunction> <cfset mf = {name="Mixed Fruit", cost=2.15} /> <cfset ff = {name="French Fries", cost=2.75} /> <cfset ss = {name="side salad", cost=3.35} /> <cfset hw = {name="hot wings", cost=3.55} /> <cfset ms = {name="moz sticks", cost=4.20} /> <cfset sp = {name="sampler plate", cost=5.80} /> <cfset apps = [ mf, ff, ss, hw, ms, sp ] /> <cfloop from="1" to="6" index="b"> <cfoutput>#testCombo(apps[b].name, apps[b].cost, apps)#</cfoutput> </cfloop> The above code tells me that the only combination that adds up to $15.05 is 7 orders of Mixed Fruit, and it takes 232 executions of my testCombo function to complete. Is there a better algorithm to come to the correct solution? Did I come to the correct solution?

    Read the article

  • CSS Footer bar bottom center issue

    - by StealthRT
    Hey all, i am trying to get my bottom bar to center on the screen but i am unable to do so. <style type="text/css"> body { background: #fffff; margin: 0; padding: 0; font: 10px normal Verdana, Arial, Helvetica, sans-serif; } * {margin: 0; padding: 0; outline: none;} #bottomBar { position: fixed; bottom: 0px; left: 0px; z-index: 9999; background: #e3e2e2; border: 1px solid #c3c3c3; border-bottom: none; width: 500px; min-width: 500px; margin: 0px auto; -moz-opacity:.90; filter:alpha(opacity=90); opacity:.90; } *html #bottomBar {margin-top: -1px; position: absolute; top:expression(eval(document.compatMode &&document.compatMode=='CSS1Compat') ?documentElement.scrollTop+(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight-this.clientHeight));} #bottomBar ul {padding: 0; margin: 0;float: left;width: 100%;list-style: none;border-top: 1px solid #fff;} #bottomBar ul li{padding: 0; margin: 0;float: left;position: relative;} #bottomBar ul li a{padding: 5px;float: left;text-indent: -9999px;height: 16px; width: 16px;text-decoration: none;color: #333;position: relative;} html #bottomBar ul li a:hover{ background-color: #fff; } a.PDF{background: url(http://www.xxx.com/img/pdficon.png) no-repeat center center; } </style> <div id="bottomBar"> <ul id="mainpanel"> <li style="padding-top:5px; font-family:Arial, Helvetica, sans-serif; padding-left: 5px;">First time here? Be sure to check out the "this" button above or download the PDF here -></li> <li><a href="http://www.xxx.com" class="PDF">Download PDF <small>Download PDF</small></a></li> </ul> </div> Thanks! David

    Read the article

  • jQuery tools modal overlay display problem in IE6-8

    - by Michael Stone
    I'm trying to enable the overlay to be modal. It works perfectly fine in FireFox, but the window object is behind the mask when it becomes modal. This prevents any interaction with it and the page is actually useless. I've tried debugging this for a while and can't figure it out. Here is a link to the example on their site: http://flowplayer.org/tools/demos/overlay/modal-dialog.html $.fn.cfwindow = function(btnEvent,modal,draggable){ //error checking if(btnEvent == ""){ alert('Error in window :\n Please provide an id that instantiates the window. '); } if(!modal && !draggable){ $('#'+btnEvent+'[rel]').overlay(); $('#content_overlay').css('cursor','default'); } if(!modal && draggable){ $('#'+btnEvent+'[rel]').overlay(); $('#content_overlay').css('cursor','move'); $('#custom').draggable(); } if(modal){ $('#'+btnEvent+'[rel]').overlay({ // some mask tweaks suitable for modal dialogs mask: { color: '#646464', loadSpeed: 200, opacity: 0.6 }, closeOnClick: false }); $('#content_overlay').css('cursor','default'); //$('#custom').addClass('modal'); } }; That's what I'm referencing when I call through: <script type="text/javascript"> $(document).ready(function(){ $(document).pngFix(); var modal = <cfoutput>#attributes.modal#; var drag = #attributes.draggable#; var btn = '#attributes.selector#'; var src = '#attributes.source#'; var wid = '#attributes.width#'; $('##custom').width(parseInt(wid)); $('div##load_content').load(src); $('##custom').cfwindow(btn,modal,drag,wid); }); </script> CSS for the modal: <style type="text/css"> .modal { display:none; text-align:left; background-color:#FFFFFF; -moz-border-radius:6px; -webkit-border-radius:6px; } </style> Exclude the and the additional pound signs, IE. "##". Screen shot of the problem: http://twitpic.com/1tak06 Note: IE6 and IE8 have the same problem. Any help would be appreciated.

    Read the article

  • CSS3's border-radius property and border-collapse:collapse don't mix. How can I use border-radius to

    - by vamin
    Edit - Original Title: Is there an alternative way to achieve border-collapse:collapse in CSS (in order to have a collapsed, rounded corner table)? Since it turns out that simply getting the table's borders to collapse does not solve the root problem, I have updated the title to better reflect the discussion. I am trying to make a table with rounded corners using the CSS3 border-radius property. The table styles I'm using look something like this: table { -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px} Here's the problem. I also want to set the border-collapse:collapse property, and when that is set border-radius no longer works (at least in Firefox)(edit- I thought this might just be a difference in mozilla's implementation, but it turns out this is the way it's supposed to work according to the w3c). Is there a CSS-based way I can get the same effect as border-collapse:collapse without actually using it? Edits: I've made a simple page to demonstrate the problem here (Firefox/Safari only). It seems that a large part of the problem is that setting the table to have rounded corners does not affect the corners of the corner td elements. If the table was all one color, this wouldn't be a problem since I could just make the top and bottom td corners rounded for the first and last row respectively. However, I am using different background colors for the table to differentiate the headings and for striping, so the inner td elements would show their rounded corners as well. Summary of proposed solutions: Surrounding the table with another element with round corners doesn't work because the table's square corners "bleed through." Specifying border width to 0 doesn't collapse the table. Bottom td corners still square after setting cellspacing to zero. Using javascript instead- works by avoiding the problem. Possible solutions: The tables are generated in php, so I could just apply a different class to each of the outer th/tds and style each corner separately. I'd rather not do this, since it's not very elegant and a bit of a pain to apply to multiple tables, so please keep suggestions coming. Possible solution 2 is to use javascript (jQuery, specifically) to style the corners. This solution also works, but still not quite what I'm looking for (I know I'm picky). I have two reservations: 1) this is a very lightweight site, and I'd like to keep javascript to the barest minimum 2) part of the appeal that using border-radius has for me is graceful degradation and progressive enhancement. By using border-radius for all rounded corners, I hope to have a consistently rounded site in CSS3-capable browsers and a consistently square site in others (I'm looking at you, IE). I know that trying to do this with CSS3 today may seem needless, but I have my reasons. I would also like to point out that this problem is a result of the w3c speficication, not poor CSS3 support, so any solution will still be relevant and useful when CSS3 has more widespread support.

    Read the article

  • IE 8: Object Expected for Every Javascript Function

    - by Yetkin EREN
    Hi; Moz say's everything is ok! IE say's object expected everywhere.. for example this my make a box function (in all.js file); function kutuyap(Eid,iduzan,text,yer,ekle){ var div; if (document.createElement && (div = document.createElement('div'))) { div.name = div.id = Eid+iduzan; document.getElementById(yer).appendChild(div); } //$('#'+yer).append("<div id="+Eid+iduzan+"></div>") $('#'+Eid+iduzan).addClass("minikutu"); $('#'+Eid+iduzan).html("&nbsp;"+text+'<span id='+Eid+'y'+iduzan+' class="yokedici">X</span>'); $("#"+Eid+'y'+iduzan).attr("onclick","kutusil('"+Eid+"y"+iduzan+"','"+iduzan+"','"+ekle+"');"); $('#'+ekle).val($('#'+ekle).val()+Eid+'-'); } and after that i call function like this; HTML; <select name="Mturs" class="inputs" id="Mturs"> <option value="0" selected="selected">Choise One</option> <option value="4">Pop</option> <option value="3">Pop-Rock </option> <option value="5">Rock (Yabanci)</option> </select> <input name="secMtur" id="secMtur" value="" type="hidden"> <script> $('#Mturs').live('change', function() { $('#Mturs :selected').each(function (i) { if ( $('#Mturs :selected').val() != 0 ) { secMturde=$('#secMtur').val().indexOf($('#Mturs :selected').val()+'-'); splitter=$('#secMtur').val().split("-") if(splitter.length<=12){ if (secMturde<0) { kutuyap($('#Mturs :selected').val(),'mtur',$(this).html(),'divmtur','secMtur'); }else{ alert("Choisen before") } }else{ alert("Max limit is 12 !") } } }); }); </script> sory for my realy bad english.. edit: and i have this tags; <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"> </script> <script type="text/javascript" src="alljs.js"></script>

    Read the article

  • Implementing rounded corners on slide down navigation menu

    - by Nick
    I am working on the slide down menu you can see here. I have rounded corners on both ul#navigation and ul.subnavigation. When the submenu slides down it is possible to see the border at the bottom of ul.subnavigation overlap with the content of ul#navigation, when I would like it to slide down smoothly, without the 'flicker'. I am aware that this issue is caused by the rounded corners. I need ul.subnavigation to cover the rounded corners at the bottom of ul#navigation when the menu drops down, without seeing the double border-bottom issue. I hope this is clear! Code is below. Thanks, Nick HTML <ul id="navigation"> <li class="dropdown"><a href="#">menu</a> <ul class="sub_navigation"> <li><a href="#">home</a></li> <li><a href="#">help</a></li> <li><a href="#">disable tips</a></li> </ul> </li> </ul> JQUERY $('.dropdown').hover(function() { $(this).find('.sub_navigation').slideToggle(); });? CSS ul#navigation, ul.sub_navigation { margin:0; padding:0; list-style-type:none; min-width:100px; background-color: white; font-size:15px; font-family: Trebuchet MS; text-align: center; -khtml-border-radius: 0 0 5px 5px; -moz-border-radius: 0 0 5px 5px; -webkit-border-radius: 0 0 5px 5px; border-radius: 0 0 5px 5px; border:1px black solid; border-top:none; } ul.sub_navigation { margin-left:-1px; position: absolute; top:28px; } ul#navigation { float:left; position:absolute; top:0; } ul#navigation li { float:left; min-width:100px; } ul.sub_navigation { position:absolute; display:none; } ul.sub_navigation li { clear:both; } a, a:active, a:visited { display:block; padding:7px; }

    Read the article

  • CSS Margin problem

    - by amitairos
    I'm starting out in HTML and CSS. I have a div element on the page, which doesn't fill the whole page. In it- there's a ul element and some list items in it. I want to put the list 227px from the top of the div element, but I can't manage to accomplish this- it pushes it more. Also- between the list items I want a margin of 40 pixels, but it also does more. What's the problem? Here's my code: Html: <body> <div class="Hashta"> <div class="Menu"> <ul id="MenuItems"> <li><a href="#" >ONE</a></li> <li><a href="#" >TWO</a></li> <li><a href="#" >THREE</a></li> <li><a href="#" >FOUR</a></li> </ul> </div> </div> </body> CSS: body { background-color: Gray; } .Hashta{ width:874px; height:650px; background-color:black; margin: auto auto 50px auto; border-radius: 20px; border: 3px solid darkgray; moz-box-shadow: 2px 2px 10px black; webkit-box-shadow: 2px 2px 10px black; box-shadow: 2px 2px 10px black; } .Menu { margin-top: 227px; padding-right: 50px; float:right; } #MenuItems { list-style:none; } #MenuItems li { text-align:center; position:relative; padding: 4px 10px 4px 10px; margin-right:30px; margin-bottom: 40px; border:none; } #MenuItems li a{ width: 280px; height: 70px; background-color: green; color:White; font-family:Arial, Helvetica, sans-serif; font-size:24px; display:block; outline:0; text-decoration:none; text-shadow: 1px 1px 1px #000; line-height: 70px; } If you want to measure the pixels- you can install this: http://www.mioplanet.com/products/pixelruler/ (click to rotate) Thanks!

    Read the article

  • mootools fx working except in ie9

    - by Craig
    This is my first attempt with Mootools, so I welcome a critique of the code. I have a dynamic list of images that expand on the 'click" event and contract on the 'mouseout' event. The code works fine in all browsers (FF, Safari, Chrome, even the smartphones) but not in IE9 (JS is enabled) Anyone with similar problem or solution? I plan to use a lightbox effect, downloading a larger & clearer image to the center of the page, instead of just resizing a small image. However, I am hesitant to attempt this, if there is problems with IE9. I have coded three image sizes with the upload commit, so the larger image is available for the lightbox, but, I don't see anything in mootools for a lightbox, or am I missing it? $i = 0; while($i < count($validate)) { <div class="validate"> <div class="validate_image_<?php echo $validate[$i]['validate_type']; ?>"> <div class="validate_image" id="validate_image_wrapper_<?php echo $i; ?>"> <?php if ($validate[$i]['validate_image_filename'] != '') { if (file_exists(UPLOAD_DIR . 'validate_image/' . str_replace('.', '_medium.', $validate[$i]['validate_image_filename']))) { echo '<img src="' . UPLOAD_URL . 'validate_image/' . str_replace('.', '_medium.', $validate[$i]['validate_image_filename']) . '" alt="Listing Image" />'; } else { echo '<img src="' . UPLOAD_URL . 'validate_image/' . str_replace('.', '_large.', $validate[$i]['validate_image_filename']) . '" alt="Listing image" />'; } } else { ?> <img src="/images/no_image_posted_validate.png" alt="no image posted" /> <?php } ?> </div> ... remainder of HTML display code function setupEnlargeImage() { window.myFx = new Fx({ duration: 200, transition: Fx.Transitions.Sine.easeOut }); $$('.validate_image').addEvent('click', function() { window.selectedImage = this.id; myFx.start(1,2.0); }); $$('.validate_image').addEvent('mouseout', function() { window.selectedImage = this.id; myFx.start(1.0,1); }); myFx.set = function(value) { var style = "scale(" + (value) + ")"; $(window.selectedImage).setStyles({ "-webkit-transform": style, "-moz-transform": style, "-o-transform": style, "-ms-transform": style, transform: style }); } }

    Read the article

< Previous Page | 6 7 8 9 10 11 12  | Next Page >