Search Results

Search found 1146 results on 46 pages for 'divs'.

Page 3/46 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Make div expand only horizontally when more floating divs are added to it

    - by Wesam
    I am trying to make a div that contains other floating divs to adjust its width such that adding more floating divs (dynamically using jQuery) will only expand the div in its width, not allowing the floating divs to create a new line. Therefore, I want to fix this issue such that each div with class grid-row only expands in width, and so I will be able to scroll using the overflow: scroll for the parent grid div. I have searched a lot for answers, and it seems that it is a famous issue. However, non of the answer solved my problem. I am currently doing this: <div id="grid_container"> <div id="grid"> <div class="grid_row"> <div class="module" id="experience"> Experience </div> <div class="header"> Google </div> <div class="header"> Microsoft </div> </div> <div class="grid_row"> </div> </div> </div> CSS: body { } #grid_container { margin: 50px auto; width: 500px; height: 500px; padding: 10px; border: black solid 1px; } #grid { overflow:scroll; height: 100%; } .grid_row { clear: both; height: 50px; } .module, .header{ padding: 10px; float: left; border: gray solid 1px; }

    Read the article

  • Flash overlay snagging on underlying divs

    - by hfidgen
    Flash overlay snags on underlying divs. What is the solution? I'm using Shadowbox to overlay a Flash file on my page, but the movement within the Flash file causes it to break or "shear" where the movie comes across the divs in the HTML hidden below. The screenshot shows it far better than I could explain ;) If you move the mouse, or tap the keyboard to "focus" the screen back on the Flash it all works seamlessly. Interestingly this seems worse in Firefox than the other browsers. Flash error image

    Read the article

  • Full Width Divs using ScrollTo.js

    - by David Haigh
    This is my first ever post. I am using the ScrollTo jQuery plugin and i have stumbled across a problem... I have 6 rows, each with 6 child divs , I would like each of these child divs to be full width. The plugin works great but I cannot seem to get the child div to be full width (then use ScrollTo to 'slide' to the next div, or to a div on the next row. ) Here is my code: http://jsfiddle.net/RZjrV/ Is it even possible? I have set body - Overflow:hidden to avoid any initial confusion. Thank you all who read this post and even take a minute to think about it. David

    Read the article

  • Dragging a div along with all of its child divs

    - by roygbiv
    I have the following code: <body> <div id="container" style="position:absolute; left:0px; top:0px; z-index:1;"> <div id="div1" style="background-color:Red; position:absolute; left:0px; top:0px; width:256px; height:256px; z-index:0;" >&nbsp;</div> <div id="div2" style="background-color:Black; position:absolute; left:256px; top:0px; width:256px; height:256px; z-index:0;" >&nbsp;</div> <div id="div3" style="background-color:Green; position:absolute; left:512px; top:0px; width:256px; height:256px; z-index:0;" >&nbsp;</div> <div id="div4" style="background-color:Yellow; position:absolute; left:768px; top:0px; width:256px; height:256px; z-index:0;" >&nbsp;</div> <div id="div5" style="background-color:Blue; position:absolute; left:1024px; top:0px; width:256px; height:256px; z-index:0;" >&nbsp;</div> </div> <script type="text/javascript"> <!-- SET_DHTML("container"); //--> </script> </body> I want to drag the 'container' div such that all child divs are dragged at the same time. I can drag individual divs, but that is not what I want. Can a div drag child divs or do they have to be images? I am using the WalterZorn drag drop API, but am open to using any API, script or whatever.

    Read the article

  • Count how many divs has a specific content?

    - by David
    I want to count how many divs with the class .tool that contain the following html by example : <b>Photoshop</b> <div class="tool"><b>After Effects</b></div> <div class="tool"><b>Photoshop</b></div> <div class="tool"><b>Illustrator</b></div> <div class="tool"><b>Photoshop</b></div> <div class="tool"><b>Photoshop</b></div> // This would return 3 How to do that using jQuery? i only can count all .tool divs? Thanks

    Read the article

  • how to make the footer div start after all other divs have finished

    - by amit
    i am having a slight problem with the alignment of the footer div. i have a header at the top. div = maincontent { two divs for content, side by side. another 2 divs side by side below the content div. } //just to represent. i know this is not html ;) now i want the footer div to start after the maincontent div finishes. i can do that if i specify a fixed height for the maincontent div. but i dont want to specify a height for it. if i dont specify the height, the footer div starts at the middle of the page. what am i doing wrong?

    Read the article

  • Trying to dynamically expand different divs with one function

    - by Matt Nathanson
    I'm trying to be able to dynamically expand / collapse multiple divs with the same code.... it's controlled with the click of a span (toggle) and then i'm trying to get the next id(the div that would slide up and down) $('span').toggle( function() { $('#albumholder').slideToggle(600); $(this).html('-');}, function() { $('#albumholder').slideToggle(600); $(this).html('+');} ); This code works to expand 1 div... but assume i have a divs #downloadholder#linksholderetc... How can i achieve the same effect with the same code? Thanks!

    Read the article

  • How get divs count in jquery?

    - by Pandiya Chendur
    I used this jquery each function and iterated my json data with it.... $.each(data.Results, function() { divs += '<div class="resultsdiv"><br /> <span style="display: inline-block;width:150px;" class="resultName">' + this.Mat_Name + '</span><span class="resultfields" style="padding-left:10px;"> Measurement&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + this.Mes_Name + '</span>&nbsp;<a href="/Materials/Delete/' + this.Id + '"> Delete</a>&nbsp;<a href="/Materials/Details/' + this.Id + '">Details</a>&nbsp; <a href="/Materials/Edit/' + this.Id + '">Edit</a></div>'; }); alert(divs.length); doesnt seem to get the count.... Any suggestion...

    Read the article

  • Next Div Does not appear correctly after floating two divs to right and left

    - by user3703669
    I have floated two divs to left and right...But the next div after those two divs does not appear correctly... My code is follows #Div1{ position: relative; float: left; } #Div2{ position: relative; float: right; } And the display as follows <div id="Div1">This is aligned to left on the same x axis</div> <div id="Div2">This is aligned to right on the same x axis</div> <div style="color: red;">After the alignment this div does not align</div> The output is as follows http://i.stack.imgur.com/8A6hz.png But I expect something like this http://i.stack.imgur.com/wVGN6.png Anyway to accomplish this task ?? Please HELP!! Urgent help needed!!!

    Read the article

  • Select Elements in nested Divs using JQuery

    - by PIKP
    I have the following html markup inside a Div named item and I want to select all the elements (inside nested divs) and clear the values. As shown in following given Jquery I have managed to access elements in each Div by using.children().each(). But the the problem is .children().each()goes one level down at a time from the parent div, so I have repeated the same code block with multiple .children() to access the elements inside nested Divs, can anyone suggest me a method to do this without repeating the code for N number of nested divs . html markup <div class="item"> <input type="hidden" value="1234" name="testVal"> <div class="form-group" id="c1"> <div class="controls "> <input type="text" value="Results" name="s1" maxlength="255" id="id2"> </div> </div> <div class="form-group" id="id4"> <input type="text" value="Results" name="s12" maxlength="255" id="id225"> <div class="form-group" id="id41"> <input type="text" value="Results" name="s12" maxlength="255" id="5"> <div class="form-group" id="id42"> <input type="text" value="Results" name="s12" maxlength="255" id="5"> <div class="form-group" id="id43"> <input type="text" value="Results" name="s12" maxlength="255" id="id224"> </div> </div> </div> </div> </div> My Qjuery script var row = $(".item:first").clone(false).get(0); $(row).children().each(function () { updateElementIndex(this, prefix, formCount); if ($(this).attr('type') == 'text') { $(this).val(''); } if ($(this).attr('type') == 'hidden' && ($(this).attr('name') != 'csrfmiddlewaretoken')) { $(this).val(''); } if ($(this).attr('type') == 'file') { $(this).val(''); } if ($(this).attr('type') == 'checkbox') { $(this).attr('checked', false); } $(this).remove('a'); }); // Relabel or rename all the relevant bits $(row).children().children().each(function () { updateElementIndex(this, prefix, formCount) if ($(this).attr('type') == 'text') { $(this).val(''); } if ($(this).attr('type') == 'hidden' && ($(this).attr('name') != 'csrfmiddlewaretoken')) { $(this).val(''); } if ($(this).attr('type') == 'file') { $(this).val(''); } if ($(this).attr('type') == 'checkbox') { $(this).attr('checked', false); } $(this).remove('a'); });

    Read the article

  • How animate stacking divs in javascript/css?

    - by Teiviere
    Say I have 2 divs with the same CSS class that are stacked on top of each other: div { width:100px; height: 100px; background: red; } How do I make it so that when I click a button at the top of the page, a new div is created from off the screen at the bottom and moves upwards stopping where the 2nd div is.. When the button is clicked again, a 4th div moves in from the bottom of the screen and stops where the 3rd div is... etc creating a "stacked" divs effect? I know about position:fixed and adjusting values for top, but I am not sure how to dynamically calculate where to stop the animation to achieve this effect.

    Read the article

  • Divs: Equal Horizontal Spacing

    - by Vecta
    I'm creating a site that has a series of four images on the homepage used as navigation with a large image beneath. <div style="width: 696px"> <div class="imglink"></div> <div class="imglink"></div> <div class="imglink"></div> <div class="imglink"></div> </div> <div style="width:696px"> ... </div> The "imglink" divs are 160px wide. I would like the images in the top div to be horizontally spaced evenly inside the div, with the two outer divs flush with the edges of the image below. I've been trying out floats, margins, padding, etc for a couple hours now and can't figure it out. Thanks for your help!

    Read the article

  • Am I suffering "divitis"? (CSS especialist needed)

    - by janoChen
    I've read lots of articles that condemn the excessive use of divs. I have a feeling that I might be doing that in the following mark up: HTML: <div id="header"> <div class="container"> <div id="banner"> <h1><a href="http://widerdesign.co.nr/">wider design</a></h1> <ul id="lang"> <li><a href="index.php">English</a></li> <li><a href="es/index.php">Español</a></li> <li><a href="tw/index.php">??(??)</a></li> <li><a href="cn/index.php">??(??)</a></li> </ul> </div> <div id="intro"> <div id="tagline"> <h2>Nulla vitae tortor mauris</h2> <p>Pellentesque faucibus est eu tellus varius in susc...</p> </div> <div id="about"> <h2>right</h2> <p>Pellentesque faucibus est eu tellus varius in susc...</p> </div> </div><!-- #intro --> </div><!-- .container --> </div><!-- #header --> CSS: .container { margin: 0 auto; overflow: hidden; width: 960px; } /* header */ #header { background: #EEE; } #header h1 { float: left; } #header h2, #header a, #header p { color: #999; } #header h1 a { background: url(../images/logo.png) no-repeat scroll 0 0; float: left; height: 30px; text-indent: -9999px; width: 500px; } #banner { border-bottom: 1px solid #DDD; padding: 0 0 15px 0; margin: 30px 0 30px 0; overflow: hidden; width: 960px; } #lang { float: right; padding: 9px 0 0 0; } #lang li { float: left; margin: 0 0 0 20px; } #lang li a { font-size: 10px; } /* intro */ #intro { overflow: hidden; padding: 0 0 30px 0; } #tagline { float: left; margin: 0 40px 0 0; width: 540px; /* 560 */ } #tagline h2 { font-size: 24px; } #about { float: right; width: 380px; } Explanation of the use of those divs: header: Defines the background color which expands until the end of the window (lies outside of the div .container). container: centers the content (but not the background). banner: to define the background or border color around ul#lang and h1. intro: same as above but for #tagline and #about (otherwise I have to define say padding or margin for tagline and about individually). Am I overusing divs? Can this be simplified?

    Read the article

  • Css trick to conjoin divs.

    - by Jronny
    Is there a way we could conjoin three divs together? Hello <div class="mainContainer"> <div class="LeftDiv"></div> <div class="CenterDiv"> <input id="txtTest" type="text"/> </div> <div class="RightDiv"></div> </div> World! what we need here is to present the code this way: Hello<*LeftDiv*><*CenterDiv with the textbox*><*RightDiv*>World I tried to use float:left on LeftDiv, CenterDiv and RightDiv but the css also affects the mainContainer. I also need to set the LeftDiv's and RightDiv's height and width on the css but I just can't do it without the float. Thanks in advance. Edit: Added question - when LeftDiv, CenterDiv and RightDiv are floated-left, why is mainContainer affected? i just want to have the three inner divs conjoined without affecting the parent div's behavior...

    Read the article

  • jQuery: Multiple animations with a delay on a set of divs

    - by Waleed
    Hey there, I have a group of 4 divs and I'm looking to use jQuery to animate them once, then have a delay using delay(), and then run another set of animations on them, putting the divs back to their original configuration. Here's the code that I have: //only selectors called 'option1' are affected by delay, and not 'option1 img' or 'option2' $("#option1").showOption1().delay(3000).hideOption1(); //if i don't attach to #option1, delay doesn't work, but the animations that need to happen simultaneously work $(document).showOption1().delay(3000).hideOption1(); jQuery.fn.showOption1 = function(){ $("#option2, #option3, #leftColumn").fadeOut(1000); $("#option1").css("zIndex", "5"); $("#option1").animate({ left: "370px", }, 1500); $("#option1 img").animate({ width: "500px", }, 1500, function(){ $("p.optionText").text('hello'); }); return this; } jQuery.fn.hideOption1 = function(){ $("#option1 img").animate({ width: "175px", }, 1500); $("#option1").animate({ left: "743px", }, 1500); $("#option2, #option3, #leftColumn").fadeIn(2000); $("#option1").css("zIndex", "1"); return this; } I've tried two ways of running these two functions, as seen on lines 2 and 5. In the case of line 2, showOption1() will run fine, but then only $("#option1").animate({ left: "743px", }, 1500); will work from hideOption1() after the delay. The rest of hideOption1() is fired immediately after showOption1() finishes, ignoring the delay. On the other hand, if I run line 5, all the code in hideOption1() runs simultaneously as desired, but ignores the delay entirely, running immediately after showOption1() finishes. How can I have all the code in hideOption1() run simultaneously after the delay? Thanks much in advance!

    Read the article

  • jQuery Equal Height Divs

    - by griegs
    If i have the following harkup; <div> <div> <div id='sameHeight'>One<br>two<br>three</div> <div id='sameHeight'>four</div> <div id='sameHeight'>five</div> <div> <div> <div id='sameHeight'>four</div> <div id='sameHeight'>six</div> <div id='sameHeight'>seven<br>eight</div> <div> </div> How can I ensure that all divs marked as "sameHeight" are the same height as their counterparts in the other div? I had a look at equalHeights plugin but that assumes all divs side by side are in the same parent. I need one that can either traverse parents or allow me to specify parents. Is there such a thing or do I need to write it?

    Read the article

  • CSS layout - Aligning two divs side by side

    - by Ronnie
    Hello, I have a small problem. I am trying to align two divs side by side using CSS, however, I would like the center div to be positioned horizontally central in the page, I achieved this by using: #page-wrap { margin 0 auto; } Thats worked fine. The second div I would like positioned to the left side of the central page wrap but I can't manage to do this using floats although I'm sure it is possible. Maybe its best to show the example of what I am describing: I would like to push the red div up alongside the white div. Here is my current CSS concerning these two divs, sidebar being the red div and page-wrap being the white div: #sidebar { width: 200px; height: 400px; background: red; float: left; } #page-wrap { margin: 0 auto; width: 600px; background: #ffffff; height: 400px; } Any help would be appreciated.

    Read the article

  • Pulling info from database and dynamically adding them into different divs

    - by Matt Nathanson
    This may be a bit of a php n00b question but i've managed to get it working this far and I'm a little bit stuck. I'm pulling 12 images with descriptions out of a database. I want to insert them into a client rotator that has 3 sets of 4. They will be contained in divs called clientrotate1, clientrotate2, and clientrotate3 respectively. Inside each of those divs I want to have 4 images with classes thumb1, thumb2, thumb3, and thumb4 I am successful in having the images and descriptions pull into clientrotator 1. Where I get stuck is to how to dynamically add the 2nd and 3rd set of data into clientrotator2 and clientrotator3. Here is my function: public function DisplayClientRotator(){ $result = mysql_query( 'SELECT * FROM project ORDER BY id DESC LIMIT 12' ) or die("SELECT Error: ".mysql_error()); $iterator = 1; while ($row = mysql_fetch_assoc($result)) { echo "<div id='clientrotate1'>"; echo "<div class='thumb$iterator'>"; echo "<img style='width: 172px; height: 100px;' src=".$row['photo']." />"; echo "<div class='transbox'>"; echo "<div class='thumbtext'>"; echo $row['campaign']; echo "</div>"; echo "</div>"; echo "</div>"; echo "</div>"; $iterator++; } Any help or pointers int he right direction would be greatly appreciated! Thanks so much, Matt

    Read the article

  • jquery toggle on hover for multiple divs

    - by Oterox
    I have some divs with identical structure and i want to toggle when the mouse hovers the div so a hides and b shows: <ul class="tweets"> <li> <div class="a"> <p>show a</p> </div> <div class="b"> <p>show b</p> </div> </li> <li> <div class="a"> <p>show a</p> </div> <div class="b"> <p>show b</p> </div> </li> <li> <div class="a"> <p>show a</p> </div> <div class="b"> <p>show b</p> </div> </li> </ul> This is the jquery i'm using: $(document).ready(function(){ var tweet = $("ul.tweets .a"); tweet.hover(function(){ $('.a').toggle(); $('.b').toggle(); }); }); But this toggles ALL the divs and i only need to toggle one.I should use $(this) but i don't know how.How could i make this work? The fiddle is here

    Read the article

  • CSS Multiple multi-column divs

    - by accelerate
    I have a bunch of items (text, image, mixed content, etc) that I want to display. The user can define what row and what column that item appears in. For example, in row 1, there could be two items/columns, both images. In row two, there could be three items / columns, one with an image, two others as pure text. Oh, and the user may specify the width of any particular column/image/item. I have a solution that uses multiple tables that works. In essence, each row is a new table. This works for the most part. I'm wondering if I can use just divs? Now my CSS foo is lacking, and I tried to copy examples from the web, and I haven't been able to get it working. Right now I have something like this: `[for each row] [for each column] [content] ` But everything is overlapping each other. I've also tried using "position: relative", but things look even more borked. So can divs actually be used for multiple rows and different number of columns?

    Read the article

  • Dynamic margin (or simulation of margin) between left floated divs

    - by BugBusterX
    I have a number of divs floated left. When browser is resized they move down or up based on how many can fit on the line. I was wondering if there is a way to dynamically (with css) have those divs align (or have margin) in a way, that they would always fill the entire screen space by having their marhin resize? In other words margin between them would resize while browser is resized, but as soon as another div can fit it will be added in the line, or if minimum margin is reached and passed another div goes to next line while margins expand again. Here's an example how it is now, resize the wondow to see he leftover space that I want to "fill" <html> <head> <style> .test { float:left; width: 100px; height:100px; background-color: grey; margin: 0 10px 10px 0; } </style> </head> <body> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> </body> </html>

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >