Search Results

Search found 2756 results on 111 pages for 'padding'.

Page 27/111 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • jQuery Validation plugin: prompt for override

    - by Sam Carleton
    I have a jQuery form that has validation of a sort. It is a data entry screen with two 'recommend ranges', one is 36-84, the other 50-300. The business rules call for the values to be either blank or greater than zero, but to prompt for confirmation if the values are outside of the range listed above. I have seen some other threads that talk about setting the class="cancel" on the submit button. From what I can tell, this will simply disable the validation. I need to prompt for a "do you want to continue, yes or no?" and if no stop the submit, if yes, continue. Below is an example from the book Pro jQuery. By default the top row needs to be between 10 and 20 to submit. How would you change it so that it prompts you and if you say Yes it submits, no prevents the submit: <!DOCTYPE html> <html> <head> <title>Example</title> <script src="jquery-1.7.js" type="text/javascript"></script> <script src="jquery.tmpl.js" type="text/javascript"></script> <script src="jquery.validate.js" type="text/javascript"></script> <style type="text/css"> h1 { min-width: 70px; border: thick double black; margin-left: auto; margin-right: auto; text-align: center; font-size: x-large; padding: .5em; color: darkgreen; background-image: url("border.png"); background-size: contain; margin-top: 0; } .dtable {display: table;} .drow {display: table-row;} .dcell {display: table-cell; padding: 10px;} .dcell > * {vertical-align: middle} input {width: 2em; text-align: right; border: thin solid black; padding: 2px;} label {width: 5em; padding-left: .5em; display: inline-block;} #buttonDiv {text-align: center;} #oblock {display: block; margin-left: auto; margin-right: auto; min-width: 700px; } div.errorMsg {color: red} .invalidElem {border: medium solid red} </style> <script type="text/javascript"> $(document).ready(function() { var data = [ { name: "Astor", product: "astor", stocklevel: "10", price: "2.99"}, { name: "Daffodil", product: "daffodil", stocklevel: "12", price: "1.99"}, { name: "Rose", product: "rose", stocklevel: "2", price: "4.99"}, { name: "Peony", product: "peony", stocklevel: "0", price: "1.50"}, { name: "Primula", product: "primula", stocklevel: "1", price: "3.12"}, { name: "Snowdrop", product: "snowdrop", stocklevel: "15", price: "0.99"}, ]; var templResult = $('#flowerTmpl').tmpl(data); templResult.slice(0, 3).appendTo('#row1'); templResult.slice(3).appendTo("#row2"); $('form').validate({ highlight: function(element, errorClass) { $(element).add($(element).parent()).addClass("invalidElem"); }, unhighlight: function(element, errorClass) { $(element).add($(element).parent()).removeClass("invalidElem"); }, errorElement: "div", errorClass: "errorMsg" }); $.validator.addClassRules({ flowerValidation: { required: true, min: 0, max: 100, digits: true, } }) $('#row1 input').each(function(index, elem) { $(elem).rules("add", { min: 10, max: 20 }) }); $('input').addClass("flowerValidation").change(function(e) { $('form').validate().element($(e.target)); }); }); </script> <script id="flowerTmpl" type="text/x-jquery-tmpl"> <div class="dcell"> <img src="${product}.png"/> <label for="${product}">${name}: </label> <input name="${product}" value="0" required /> </div> </script> </head> <body> <h1>Jacqui's Flower Shop</h1> <form method="post" action="http://node.jacquisflowershop.com/order"> <div id="oblock"> <div class="dtable"> <div id="row1" class="drow"> </div> <div id="row2"class="drow"> </div> </div> </div> <div id="buttonDiv"><button type="submit">Place Order</button></div> </form> </body> </html>

    Read the article

  • How to make a div expand vertically to wrap the content within it?

    - by MalcomTucker
    I have a div which wraps a number of images that are generated dynamically. I don't know how high the list of images is. My problem is the div that contains the dynamically generated images doesn't behave like it is housing any content - I want it to extend to the height of the list of images. Each image is itself wrapped in a div. This is the wrapper div: .block { padding:10px; margin-top:10px; height:auto; background-color:#f9f9f9; } This is the markup dynamically generated for (one of) the images: <div class="block"> <div style="float: left; padding: 2px 2px 2px 2px;"><IMG SRC="45.jpg" BORDER="0"/></div> ..... How do I get the block div to extend down with the images? Thanks

    Read the article

  • How do I control Google Search Results display properties?

    - by fmz
    I am putting the finishing touches on a customized Google Search for a site and need a little assistance tweaking the header on the results page. I was able to manage the spacing of the results content with: #results4 { width: 620px; padding: 20px; } However you will notice that the top row of information Results 1 - 10 for search... runs off the right side of the content area. I tried using the following code, but it didn't help: .t td { align:left; } I also tried margin-right and padding but those didn't work either. what is the best way to get that content to move over into the content area? thanks.

    Read the article

  • How to position a span inside a headline tag?

    - by citronas
    I'm forced to find a solution for the following situation: I have a h1 tag, like this: <h1 style="text-align: left">FOO FOO FOO<span class="h1subSpan">FOO 1 Foo 2</span></h1> The result should be like the following: FOO FOO FOO this space is invisible and achived through floating Foo1 Foo 2 This solution works with FF, Opera and IE8. How can I adapt this, to work with IE 7 as well? .h1subSpan { font-size:small; float:right; padding-right:19px; padding-top:5px; }

    Read the article

  • [CSS] style input tag

    - by nosferat
    Hi! ASP.Net has a tag called CheckboxList. The output of this tag looks like this: <table class="checkbox"> <tbody> <tr> <td> <input id="/*longdynamicstring1*/" type="checkbox" name="/*longdynamicstring2*/" /> <label for="/*longdynamicstring1*/">Label Text</label> </td> </tr> </tbody> </table> I want to position the label and the input but I cannot find out how. Tried the following: .checkbox input{ padding-right: 5px; } and .checkbox input[type='checkbox'] { padding-right: 5px; } but neither of them had any effect. Because it's ASP I cannot set a class for the input elements and I cannot reference the id because it's dynamic.

    Read the article

  • Jscrollpane causese text to disappear on internet explorer

    - by Crippletoe
    Hello all, in my current site, i am using the new Jscrollpane in order to generate a scrollbar for a menu (not my descision but the designer's descision so i dont wanna get into how 90's that all looks like..). my menu is based on a <UL> the <li> elements inside it have the attribute "text-align: right;". my problem that on IE alone the menu text doesnt show when i apply the ScrollPane to the menu. when i delete the ScrollPane function from my code- the menu re-appears. i checked the page with "microsoft Expression" DOM inspector in order to examine how IE sees my code and i can see the <li> elements there, only the text inside them is missing. when i disable the "text-align: right;" for the <li> in my CSS, the text shows again. i suspect this has something to do with the jScrollPane's containing which is relatively aligned but i cannot be sure.. can anyone suggest some fix for this problem? a link to a page where you can see the problem is here: http://kaplanoland.com/index.php?option=com_content&view=article&id=2&Itemid=12 the problematic menu is on the right side of the page. on every browser but IE you can see the text. only on IE not. my CSS code for that menu (not including the jScrollPane CSS) is here: div#menu2{ position: absolute; top: 123px; right: 36px; width: 330px; height: 150px; } div#menu2_scroll{ /*the actual scroller*/ height: 150px; } div#menu2 div#menu2_contain{ } div#menu2 li{ text-align: right; } div#menu2 li span{ line-height: 18px; } div#menu2 a:link, div#menu2 a:visited{ color: #808285 ; font-family: Arial, Helvetica, sans-serif ; font-size: 12px ; } div#menu2 a:hover, div#menu2 li#current a{ color: #000000 ; font-family: Arial, Helvetica, sans-serif ; font-size: 12px ; } div#menu2 span.separator{ display: block; padding-top: 12px; padding-bottom: 40px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #000000; } div#menu2 span.separator span { padding-top: 12px; border-top-width: 1px; border-top-style: solid; border-top-color: #808285; } thank you all so much.

    Read the article

  • First record does not show in pagination script

    - by whitstone86
    This is my pagination script which extracts info for my TV guide project that I am working on. Currently I've been experimenting with different PHP/MySQL before it becomes a production site. This is my current script: <?php /*********************************** * PhpMyCoder Paginator * * Created By PhpMyCoder * * 2010 PhpMyCoder * * ------------------------------- * * You may use this code as long * * as this notice stays intact and * * the proper credit is given to * * the author. * ***********************************/ // set the default timezone to use. Available since PHP 5.1 putenv("TZ=US/Eastern") ?> <head> <title> Pagination Test - Created By PhpMyCoder</title> <style type="text/css"> #nav { font: normal 13px/14px Arial, Helvetica, sans-serif; margin: 2px 0; } #nav a { background: #EEE; border: 1px solid #DDD; color: #000080; padding: 1px 7px; text-decoration: none; } #nav strong { background: #000080; border: 1px solid #DDD; color: #FFF; font-weight: normal; padding: 1px 7px; } #nav span { background: #FFF; border: 1px solid #DDD; color: #999; padding: 1px 7px; } </style> </head> <?php //Require the file that contains the required classes include("pmcPagination.php"); //PhpMyCoder Paginator $paginator = new pmcPagination(20, "page"); //Connect to the database mysql_connect("localhost","root","PASSWORD"); //Select DB mysql_select_db("mytvguide"); //Select only results for today and future $result = mysql_query("SELECT programme, channel, airdate, expiration, episode, setreminder FROM lagunabeach where expiration >= now() order by airdate, 3 ASC LIMIT 0, 100;"); //You can also add reuslts to paginate here mysql_data_seek($queryresult,0) ; while($row = mysql_fetch_array($result)) { $paginator->add(new paginationData($row['programme'], $row['channel'], $row['airdate'], $row['expiration'], $row['episode'], $row['setreminder'])); } ?> <?php //Show the paginated results $paginator->paginate (); ?><? include("pca-footer1.php"); ?> <?php //Show the navigation $paginator->navigation(); ?> Despite me having two records for the programmes airing today, it only shows records from the second one onwards - the programme that airs at 8:35pm UK time GMT does not show, but the later 11:25pm UK time GMT one does show. How should I fix this? Above is my code if that is of any use! Thanks

    Read the article

  • Define Javascript slider hit/rollover area

    - by Rob
    Hey, Im having an issue defining the hit area for a javascript sliding element. See example: http://www.warface.co.uk/clients/warface.co.uk/ Please slide over the grey box on the right side to reveal the button, although this works I would only like for the slider to only be triggered by rolling over the red block. CSS .slidingtwitter { /* -- This is the hit area -- */ background: #ccc; width:255px; height:55px; overflow: hidden; top:50%; right: 0px; /* -- This is the sliding start point -- */ position: fixed; font-family: Gotham, Sans-Serif; z-index: 50; } .slidingtwitter.right { right:0px; } .slidingtwitter .caption { /* -- This is the sliding area -- */ background: #fff; position: absolute; width:260px; height:55px; right: -205px; /* -- This is the sliding start point -- */ } .slidingtwitter a { color: #484848; font-size: 20px; text-transform: uppercase; } .slidingtwitter a:hover { color: black; } .slidingtwitter .smaller { font-size: 12px; font-family: Gotham Medium; } .twitterblock { background: #f35555 url("styles/images/button_twitter.png") no-repeat 14px 15px ; width:35px; height:35px; padding:10px; float:left; display:block; } .slidingtwitter .followme { background: url("styles/images/button_arrowheadthin.jpg")no-repeat right 0; height:35px; display:block; float:left; line-height:14px; width:140px; margin:10px 0px 0px 14px; padding-top:6px; padding-right: 40px; } JS $('.slidingtwitter').hover(function(){ $(".slide", this).stop().animate({right:'0px'},{queue:false,duration:400}); //Position on rollover },function() { $(".slide", this).stop().animate({right:'-205px'},{queue:false,duration:400}); //Position on rollout }); Any suggestions would be much appreciated.

    Read the article

  • CSS3: Top align of list item

    - by Irishgirl
    CSS3: Top align of list item. See image as below. How can I align a blue arrow to align on top of a senetence of each list. I'm using jQuery 1.7 and it is for iOS (iPhone). ul.lists{ padding:0 0 15px 0;} ul.lists li{ line-height:18px; border-bottom:1px #bfeaf0 solid; padding:6px 12px; background:url(../images/arrow_cyan.svg) no-repeat left; } /* no-repeat left top; */ I've tried to include a js as offset $("li:last").offset({ top: -15 }); but it did not work properly because I don't know how to move all blue arrows to align each list even the sentence might might run into more than one line.

    Read the article

  • Wordpress plugin $post

    - by Jordan Pagaduan
    I have already get how to insert in the database. My only problem is to get the value of text box to insert in the database. Here is my code: function dbAdd() { global $wpdb; $new_title = $_POST['new_title']; $new_author = $_POST['new_author']; $new_url = $_POST['new_url']; if($wpdb->insert('wp_podcast_data', array( 'mp3_id' => '', 'title' => '$new_title', 'creator' => '$new_author', 'url' => '$new_url') )) { echo"<h1>Save Successfully!</h1>"; }else { echo mysql_error(); } } ---------------------------------------------------------- function player_manager_index() { if($_SERVER['REQUEST_METHOD']=='POST') { dbAdd(); } ?> <h3>Podcast Player Manager (This Plug is not yet finish)</h3><br /> <p>Note: This Player Manager needs the URL of mp3 file that you want to include in your podcast player.</p> <form method="post" action=""> <label for="new_title" style="display:block; padding-top: 5px; cursor: default;">Title</label><input type="text" id="new_title" name="new_title" size="50" /> <label for="new_author" style="display:block; padding-top: 5px; cursor: default;">Author</label><input type="text" id="new_author" name="new_author" size="50" /> <label for="new_url" style="display:block; padding-top: 5px; cursor: default;">URL</label><input type="text" id="new_url" name="new_url" size="50" /> <div><input type="submit" value="Add New" style="margin-left: 20px; margin-top: 15px;" /></div> </form> Please Help me. I'm newbie in wordpress. Thank you so much.

    Read the article

  • DIV not sizing correctly when elements inside are bigger?

    - by Ben Dauphinee
    Tried removing the overflow hidden, but that does not seem to fix it. Suggestions? Relevent HTML and problem illustration here: http://mgc.selfip.com/bugscreen01.jpg Relevent CSS #nav{padding: 5px 0px; overflow: hidden; background-color: #7af;} ul#nav{white-space: nowrap;} #nav li{display: inline; list-style-type: none;} #nav li a{padding: 5px 10px;} #nav a{font-family: "Adobe Caslon Pro", "Hoefler Text", Georgia, Garamond, Times, serif; font-size: 14pt; font-variant: small-caps;} #nav a:link, #nav a:visited{color: #fff; text-decoration: none;} #nav a:hover, #nav a:focus{color: #fff; background: #91db24;}

    Read the article

  • What is the standard way to add an icon to a link with CSS?

    - by ewernli
    I'm used to use padding + background-image to place an icon next to a link. There are many example of this approach. Here is one from here: <a class="external" href="http://www.othersite.com/">link</a> a.external { padding-right: 15px; background: transparent url(images/external-link-icon.gif) no-repeat top right; } But most browser don't print background image, which is annoying. What is the standard to place icon next to links which is semantically correct and works in all cases? (I couldn't find an exact similar question. If there is one, just close this one as duplicate)

    Read the article

  • Can't figure out the color of an svg element

    - by yass
    I have a very simple HTML page, viewable on gh-pages with the following code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link href="style.css" media="screen" rel="stylesheet" type="text/css"> <script src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'> </script> </head> <body> <div id="page"> <div id="content"> <div id="heatmap"> <svg style="margin-left: 80px; color: rgb(255, 255, 255);" width="800" height="880"> <g transform="translate(80,80)"> <rect style="color: rgb(255, 255, 255);" height="720" width="720"> </rect> </g> </svg> </div> </div> </div> </body> </html> with the following CSS: body { background-color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #FFFFFF; } #wrapper { margin: 0 auto; padding: 0; } #page { width: 1000px; margin: 0 auto; padding: 40px 0px 0px 0px; } #content { float: left; width: 660px; padding: 0px 0px 0px 0px; background: #FFFFFF; } I expect the rectangle, 'svg rect' to be the color #FFFFFF, or white. But it shows up as some other color. I opened it up in firebug, and it shows the computed color to be #FFFFF:

    Read the article

  • Changing all CSS styles with a property via Jquery

    - by Joe
    On a page I include some css eg: <style type='test/css'> .myBox{ color:#000000; border:#FFFFFF; padding:4px; } .myBox2{ color:#000000; border:#FFFFFF; padding:4px; } </style> I want to then change the "color" property set within both myBox and myBox2 in jquery, without knowing the actual name (myBox, myBox2) of the css style. In otherwords, I want to update ALL css styles on the page where color = certain value, and then also update border where = certain value. An example (not valid code) might be: $("all css [color:#000000]").html("#FF0000"); How could this be possible using jquery?

    Read the article

  • css position when resizing browser

    - by user478636
    When resizing the browser I noticed that all the elements get out of place and the website layout gets distorted. This also occurs on with low-resolution. Is this because I have used position:relative;? How can I make the page elements not move from their position when resizing. body{ background:url(../img/bg-silver.jpg) #F2F2F2; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size:11px; line-height:18px; color:#636363; margin-top:10%; } #containerHolder { background: #eee; padding: 5px; position:relative; } #container { background: #fff; background:rgba(245,245,245,0.8); border: 1px solid #ddd; } #main { margin: 0 0 0 20px; padding: 0 19px 0 0; }

    Read the article

  • Table cells with space between them

    - by Naor
    I want to make the foollowing but with CSS classes - as simple as can be: <table cellspacing="0" cellpadding="0"> <tr> <td style="color:red;text-decoration:underline;padding-right:50px;>cell1</td> <td style="color:red;text-decoration:underline;>cell2</td> </tr> <tr> <td style="color:red;text-decoration:underline;padding-right:50px;>cell3</td> <td style="color:red;text-decoration:underline;>cell4</td> </tr> </table> What is the best way to do it?

    Read the article

  • centering ul so that columns will be centered too

    - by user1815176
    In my page I want it so that when you resize the page past the point of the pictures, that the pictures will go into another row, all the way so each picture has it's own row. And then potentially I won't need any media queries. But unfortunaltely I can't find a way to center. I have tried everything I can think of, aside of making hundreds of media queries with different positioning. I can't make it a block because then it won't go into rows, I have tried margin: 0 auto;. I have tried changing the padding, I have even tried using the html align="center". Nothing is working. Here is the website http://spencedesign.netau.net/singaporehome.html Also I have a minor issue, sorry to croud this with two questions. But when it is in it's mobile state, there is no 10px padding at the bottom, and the singapore title is on the left side rather than floating. Here is my code <html> <head> <title> Singapore - Home </title> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> <meta name="viewport" content="width=device-width, initial scale=1.0"> <style> * { margin: 0; padding: 0; } body { background: url('woodbackground.jpg'); background-size: cover; min-height: 100%; min-width: 100%; position: relative; top: 0; bottom: 0; left: 0; right: 0; } #container { width: 90%; margin: 0 auto; } h1 { font: bold 65px Helvetica, Arial, Sans-serif; text-align: center; color: #eee; position: relative; top: 60px; } h3 { font: 25px Helvetica, Arial, Sans-serif; text-align: center; color: #eee; position: relative; top: 80px; } ul#gallery { list-style: none; display: inline; margin: 0 auto; position: relative; top: 175px; width: 1300px; } ul#gallery li a { float: left; padding: 10px 10px 25px 10px; background-color: #eee; border: 1px solid #fff; -moz-box-shadow: 0px 2px 15px #333; position: relative; margin: 10px; text-decoration: none; } ul#gallery li a:hover { position: relative; top: -15px; } ul#gallery li a img { height: 150px; width: 250px; max-width: 100%; } ul#gallery li a p { margin-top: 25px; text-align: center; color: #000; font: Helvetica, Arial, Sans-serif; text-decoration: none; font-size: 20px; } @media screen and (max-width: 640px)    { ul#gallery {   left: 2.2%;   width: 600px; }   ul#gallery li a:hover {   top: 0px; } } </style> <body> <div id="container"> <h1> Singapore </h1> <h3><i> Singapore is the worlds first machine that works </i>- Lee Kuan Yew </h3> <ul id="gallery"> <li><a href="#"> <img src="gallery.jpg" alt="gallery" /> <p> Gallery </p> </a></li> <li><a href="#"> <img src="facts.jpg" alt="facts" /> <p> Facts </p></a></li> <li><a href="#"> <img src="tour.jpg" alt="tour" /> <p> Tour </p></a></li> <li><a href="#"> <img src="author.jpg" alt="author" /> <p> Author </p> </a></li> </ul> <br/> </div><!-- Container --> </body> <html> Thanks!

    Read the article

  • Is it possible to position an element relative to the border-box of its parent?

    - by Timwi
    Consider the following jsfiddle for reference: http://jsfiddle.net/apmmw2ma/ As you can see, the “inner” box (with the red border) is positioned relative to the outer’s padding-box: left:0 positions it just to the right of outer’s border, and top:100% appears to mean “100% of the content plus padding, but not the border”. Unfortunately, adding box-sizing: border-box to the outer div seems to have no effect. I want to position a child element directly below its parent’s border-box, i.e. the two borders should abut no matter how thick they are. Is this possible?

    Read the article

  • div style working in Firefox but not IE8

    - by Nathan Spiwak
    I am creating a banner that resizes to fit the window (I got the code of a blog post) and it works fine in Firefox, but it doesn't display at all in IE8. Please help!! <html> <body> <div style="position:relative; width:100%; height:100%; margin:0px; padding:0px; left:0px;right:0px;z-index:1”><img src="https://na6.salesforce.com/servlet/servlet.ImageServer?id=01580000000pT8r&oid=00D80000000aYeL&lastMod=1273785188000" width="100%"></div> <div style="z-index:2; position:relative; margin:0px; padding:0px;"> </div> </body> </html>

    Read the article

  • How do I create a hybrid two column lay out like php.net?

    - by Koning WWWWWWWWWWWWWWWWWWWWWWW
    I want to create a layout like this: | | | | | | | | | | | | | | | | -FIXED-|--------FLUID---------| | | | | | | | | | | | | | | Just like http://www.php.net/ I have this: div#sidebar { float: left; width: 200px; padding: 4px; background-color: #EEEEEE; border-right: dashed 1px #AAAAAA; } div#content { padding: 4px; margin-left: 208px; } But the problem is that the sidebar isn't at least the height of the content block (which it should be). Can anyone help me? Thanks Oh, one more thing: I will never, ever use a table for this!

    Read the article

  • Why are my margins still collapsing?

    - by Brandon Dorsey
    My code in this "Fiddle" shows that I have adjacent elements which vertical margins are collapsing on one another. I understand that due to the nature of vertical margins in css, the largest of the two is chosen, In my case the p tag. What I am having trouble with is trying to break the margins by using a 1px border or 1px padding. I've seen it work with other workarounds such as position:absolute or float method. I am not understanding why using 1px border or padding is not working properly to give me 15px of space.

    Read the article

  • What is wrong with these jquery statements?

    - by Pandiya Chendur
    I cant able to get this jquery statement to work on page load but it works once when i refresh F5 the page..... <script type="text/javascript"> var itemsPerPage = 5; $(document).ready(function() { getRecordspage(0, itemsPerPage); var maxvalues = $("#HfId").val(); alert(maxvalues); $(".pager").pagination(maxvalues, { //my syntax }); }); </script> On the initial pageload alert(maxvalues); is nothing... But when i refresh it shows the value of maxvalues which is in the hidden field HfId because it is assigned in the function getRecordspage.... Why this strange behaviour.... Any suggestion... EDIT: function getRecordspage(curPage) { $.ajax({ type: "POST", url: "Default.aspx/GetRecords", data: "{'currentPage':" + (curPage + 1) + ",'pagesize':5}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(jsonObj) { $("#ResultsDiv").empty(); $("#HfId").val(""); var strarr = jsonObj.d.split('##'); var jsob = jQuery.parseJSON(strarr[0]); var divs = ''; $.each(jsob.Table, function(i, employee) { divs += '<div class="resultsdiv"><br /><span class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Address + '</span></div>'; }); $("#ResultsDiv").append(divs); $(".resultsdiv:even").addClass("resultseven"); $(".resultsdiv").hover(function() { $(this).addClass("resultshover"); }, function() { $(this).removeClass("resultshover"); }); $("#HfId").val(strarr[1]); } }); }

    Read the article

  • Is the use of union in this matrix class completely safe?

    - by identitycrisisuk
    Unions aren't something I've used that often and after looking at a few other questions on them here it seems like there is almost always some kind of caveat where they might not work. Eg. structs possibly having unexpected padding or endian differences. Came across this in a math library I'm using though and I wondered if it is a totally safe usage. I assume that multidimensional arrays don't have any extra padding and since the type is the same for both definitions they are guaranteed to take up exactly the same amount of memory? template<typename T> class Matrix44T { ... union { T M[16]; T m[4][4]; } m; }; Are there any downsides to this setup? Would the order of definition make any difference to how this works?

    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

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >