Search Results

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

Page 31/46 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • margin-bottom property of a div's last element doesn't "extend" the div

    - by kitsched
    I have an element in a div, which has a background image. Below the div I have another div with another background image. Now the problem is that if the last element contained in the first div has margin-bottom applied there will be a gap between the 2 divs like this: Notice the gray gap caused by the margin-bottom property of the h2 element contained within the first div. I know this can be solved if I switch margin-bottom to padding-bottom but what if I need margin-bottom? How to fix this?

    Read the article

  • jQuery - search for previous selector relative to current

    - by Thomas Slater
    I have a form with 3 sections in it. Each section has a dedicated div for fairly long contextual help messages regarding the input that has focus. My question is, if I give each of these help divs a class of "form-tip" and each input that has a tip the class "has-tip", how can I get the tip to always show up in the previous "form-tip" div? Something like: $('.has-tip').each(focus(function() { var tip = $(this).attr('title'); // Find most recent $('.form-tip') in the DOM and populate it with tip })); I hope that makes sense... Thanks for any help.

    Read the article

  • Magento: custom module layout override not working

    - by Socrates
    I have a small custom module which is supposed to show on all product pages, but it doesn't. It only shows when setting its reference to "content", but I want it to display witin the already existing product view divs, thus, display it within the "product.info" reference. Here's my code: app/design/frontend/default/company/layout/company/socialbuttons.xml <?xml version="1.0"?> <layout> <catalog_product_view> <reference name="product.info"> <block type="core/template" name="company_socialbuttons" template="company/socialbuttons.phtml" /> </reference> </catalog_product_view> </layout> I've spent hours finding the error, without success and if I can't find a solution soon I will do it the ugly way (calling the phtml inside the parent phtml). What am I doing wrong?

    Read the article

  • filter lists that are split by easylistsplitter.js?

    - by Jason
    Hi Everyone, At my site - jasondaydesign.com. I'm using easylistsplitter.js. I designed it this way, because I actually wanted a masonry.js style layout but I couldn't find a way to filter divs. So I made the switch to lists, and found a plugin that allowed me to have a masonry style layout. Unfortunately, I have tried several list filters including: filterprojects.js and a netuts tutorial on a filterable portfolio. Unfortunately, both work, but only on the first column. I can't seem to figure out a way to have a filter plugin work on all list items that have been split by easylistsplitter.js Thoughts?

    Read the article

  • jQuery wildcard selection

    - by Yuval A
    Suppose you have some <div>s: <div id="div_num1"></div> <div id="div_num2"></div> <div id="div_num3"></div> You can select all those divs by choosing $("div[id^='div_num']"). How can you buld a function that references the number succeeding the prefix? For example, a function which will alert the number 3 for "div_num3". More generally, how can you use full-blown regex in jQuery selectors?

    Read the article

  • How do I set the height of a floating div in CSS?

    - by indieinvader
    I have two floating divs, each is 50% wide, the problem I have is that I can't get them to stretch to the full height of the window. Essentially I want each div to have 50% width and 100% height (but it isn't working) html <section> <div></div> </section> <section> <div></div> </section> css section { background: black; width: 50%; min-height: 100%; height: 100%; margin: 0; float: left; } section > div { height: 100%; }

    Read the article

  • jquery: hide/show div2 inside other div1 on mouseover

    - by Omu
    I have something like this: <div id="wrap1"> <div id="util1"> </div> bla bla </div> <div id="wrap2"> <div id="util2"> </div> bla bla </div> <div id="wrap3"> <div id="util4"> </div> bla bla </div> ... I need to show the "util" divs when cursor is over the "wrap" div and hide it back when cursor leaves the "wrap" div

    Read the article

  • how to align 4 DIV's right of each other within another DIV

    - by Michel
    Hi, i want to position 4 divs next to each other, at a certain position within the parent div. So the div structure is this (i'll call the top most div the maindiv): <div> <div>1</div> <div>2</div> <div>3</div> <div>4</div> </div> now i want to set div with text '1' at the left in the maindiv now i want to set div with text '2' at 50 px from the left side in the maindiv now i want to set div with text '3' at 150 px from the left side in the maindiv now i want to set div with text '4' at 200 px from the left side in the maindiv I think :-) i have tried ALL possible css constructs, but it didn't work, sadly. Anyone an idea?

    Read the article

  • How to get attributes values separately for each container present on the webpage in jquery ?

    - by Rachel
    This question is in continuation to How to get attributes of container in jquer, I have different containers on my webpage and all of them have <div id = "some values"> now how can I get attributes values separately for each component ? Is there any way I can know which attribute id belong to which container div ? Currently I am using : var id = $( '.promotion' ).attr( 'id' ); But if I have multiple promotional components on page and all have same div attribute as id than how can I relate that this particular attribute id belonged to this specific container ? Update: I am having a function which is called for each container present on the page and so if I am using above mentioned code than will it not always return me the first match for id in the div and would never go to other divs and so I will always get same value for id which is for the first container ? If so than what is the work around for this ? Hope this question is clear.

    Read the article

  • Is there a semantic difference <span>'s and <div>'s?

    - by DavidR
    I know when coding HTML, I'm supposed to keep semantics in mind, e.g., h1 needs to be a main header, h2 needs to be a subheader, tables need to be tables, use <em> for emphasis instead of <i>, etc. Is there a proper difference between divs and spans except one is a block and the other is in-line? When I was learning I was told that <span>'s were for styling text mid-line. If I had a small blurb of text that I needed positioned at a certain point in my webpage, one that doesn't warrent a <p> tag, would I use a span should I stick with div's? What if that text needs to cover two lines (i.e., it needs a width) if it contains nothing but text, what should I use?

    Read the article

  • A depth (z-index) nightmare.

    - by JCOC611
    The best way to illustrate this question is with...a Fiddle! Before you visit the fiddle, notice there is text behind the grayest element, which is on top of a light gray element that has a border. There is a main wrapping div (root), and two wrapping divs inside (wrap1 and wrap2). The problem here is that I need the content of wrap2 (highlight) to be behind the content of wrap1 (text), but in front of the background of the root. This, however, must not change: The HTML, the elements and wraps should be left untouched. Excluding the order of wrap1 and wrap2 inside root. The highlight div must keep the absolute positioning. Styling highlight with background-color is not an option, the existence of highlight is a must. PS: the italics reference the id's of <div>s in the fiddle example, for whomever was too lazy to visit it.

    Read the article

  • Checkout Control Panel that updates pricing???

    - by Stefan
    Hello all, my first post here. I am not much of a programmer, I can tailor some things for my personal needs but thats about it. I am looking for a script (jQuery preferred I suppose) which is easy to incorporate and bind to a few DIVs to be updated dynamically. Nothing too deep, just something that can updated price at check-out... Could I get some recommendations on a solid and simple widget for this? I appreciate any help/suggestions!

    Read the article

  • How can I keep a div's scrollbar at the bottom of the div using jQuery?

    - by dannytatom
    I have a div called #output, styled with overflow: scroll;. Using jQuery.ajax, it's being updated every x second. I'd like to have it so that when the scrollbar appears (after the divs filled up), it should continously stay at the bottom of the div instead of the top, like most chat clients do. I'm sure there's a way to do this, I just can't seem to find it. Here's the Sass #output :margin 0 0 10px 0 :padding 10px :height 500px :overflow scroll :background #111111 :border 1px solid #000000 :color #8e8e8e and the Haml is just a simple #output = @output

    Read the article

  • using JQuery on beforeprint event problem. Not answered.

    - by Cesar Lopez
    Hi all, I have the following function. <script type="text/javascript"> window.onbeforeprint = expandAll; function expandAll(){ $(".fieldset:gt(0)").slideDown("fast"); } </script> For this html <table class="sectionHeader" ><tr ><td>Heading</td></tr></table> <div style="display:none;" class="fieldset">Content</div> I have several block of content over the page, but when I do print preview or print, I can see all divs sliding down before opening the print preview or printing but on the actual print preview or print out they are all collapse. Anyone have any idea why is this? Thanks.

    Read the article

  • CSS3 selector to find the 2nd div of the same class

    - by mpeters
    I need a CSS selector that can find the 2nd div of 2 that has the same class. I've looked at nth-child() but it's not what I want since I can't see a way to further clarify what class I want. These 2 divs will be siblings in the document if that helps. My HTML looks something like this: <div class="foo">...</div> <div class="bar">...</div> <div class="baz">...</div> <div class="bar">...</div> And I want the 2nd div.bar (or the last div.bar would work too).

    Read the article

  • How to save/export a DOM element to an image?

    - by Don Don
    Hi, I have a web page which has a form element (with its ID known) and inside the form there are multiple DIVs, and the position of each div may be changed. What I'd like to do is: a) Save the current state of this form // var currentForm=document.forms['myFrm'].innerHTML; would probably suffice... b) Save or export the entire form with the most current position of each DIV to an image file. // how to save/export the javascript var of currentForm to an image file is the key question. Any help/pointer would be appreciated.

    Read the article

  • How to convert Beautiful Soup Unicode into a decimal value?

    - by MikeTheCoder
    I'm trying to Use python's Beautiful Soup Library to grab a bunch of divs from an html file, and from there get the string - which is a money value - that's inside the div. Then remove the dollar sign and convert it to a decimal so that I can use a greater than and less than conditional statement to compare values. I have googled the heck out of it and can't seem to come up with a way to convert this unicode string into a decimal value. I really could use some help here. How do I convert unicode into a decimal value? This was my last attempt: import unicodedata from bs4 import BeautifulSoup soup = BeautifulSoup(open("/Users/sm/Documents/python/htmldemo.html")) for tag in soup.findAll("div",attrs={"itemprop":"price"}) : val = tag.string new_val = val[8:] workable = int(new_val) if workable > 250: print(type(workable)) else: print(type(workable)) Edit: When I print the type of new_val I get : print(type(new_val))

    Read the article

  • stick element to top of page until next element of that type appears

    - by aharon
    I'm having a hard time giving a good description of this, but bear with me: If I have a page structed like this <h2>Chapter 1</h2> <p>Lots of text that has mutiple screen worths of content</p> <h2>Chapter 2</h2> <p>Lots of text...</p> I'd like to have "Chapter 1" absolutely positioned or whatever at the top of the page until the user scrolls down to where "Chapter 2" starts, at which point now "Chapter 2" is displayed at the top of the page. We can add wrapper classes and divs if needed. Solutions that use JQuery would be great.

    Read the article

  • How to get the selected item from UL using jQuery?

    - by Vibin Jith
    I am creating a tab control using Ul and Divs. Ul is used to display the tab heads. When the user selects one Tab (ie , 'Li') ,the tab back color get changed with respect to others. I want to get the Selected and not selected li in that Ul . I used $(".tab li:selected").css("background-color","red"); $(".tab li:deselected").css("background-color","white"); It 's not working, I know the code does not work .just guess it. Now may you understood my problem,right?

    Read the article

  • jQuery changing css on navigation when div # scrolls into view

    - by Jonny Wood
    I'm looking to recreate the effect used on this site: http://www.brizk.com/ The site uses one large page that scrolls down. As you scroll down and pass different sections the menu navigation on the left changes css class to "current" as the corresponding div comes into view. I presume this can be done with jQuery using $(window).height(); I'm fairly new to jQuery and what I want to write is something like this (in laymans terms): Get height of browser window – if div#content1 is 100px from top and/or 200px from bottom change menu a#link1 to '.current' – else remove .current from all menu a links ... and repeat for 4 different content divs. Can anyone point me in the right direction..? Thanks.

    Read the article

  • Do I have to duplicate this function? - jQuery

    - by Josh
    I'm using this function to create an transparent overlay of information over the current div for a web-based mobile app. Background: using jQTouch, so I have separate divs, not individual pages loading new. $(document).ready(function() { $('.infoBtn').click(function() { $('#overlay').toggleFade(400); return false; }); }); Understanding that JS will run sequentially when i click the button on the first div the function works fine. When I go to the next div if I click the same button nothing "happens" when this div is displayed, but if i go back to the first div it has actually triggered it on this page. So I logically duplicated the function and changed the CSS selector names and it works for both. But do I have to do this for each use? Is there a way to use the same selectors, but load the different content in each variation?

    Read the article

  • How to reduce size of html rendered from ASP.net ?

    - by Rbacarin
    I'm developing a newsletter in asp.net that will be send to a large quantity of users, so each kilobyte that I can reduce will help a lot in the use of bandwidth consumption, what I do until know is write the aspx excluding some spaces between tags, and before render, i've renamed some controls ids to "-" to save more space. So now, the file has 50kb. I need a file with 25 Kb. Can anyone teach me any other way do save more space ? ps.: I Use 3 divs with some data, and 2 repeaters, one inside other, to generate a table with some data for me. thanks in advance

    Read the article

  • jQuery hide/show div using variables

    - by user295927
    I am a nOOb to jQuery. I want to use variables in jQuery to hide/show divs. what I have so far is: $(document).ready(function(){ $('#listMenu a').click(function () { var getPage = $(this).attr("id"); var getName = $(this).attr("name"); //console.log(getPage); //console.log(getName); $("#" & getName ).show(); }); }); firebug console shows that I have the vars correctly, but I get this error next: this[H].style is undefined [Break on this error] (function(){var R=/((?:((?:([^()]+)...typeof K==="string"?K:K+"px")}})})(); any help is appreciated. sjs

    Read the article

  • best way to filter out non-representational elements

    - by nonano
    Hi there, I am using phpQuery in order to apply some twaks to editorial content. As its syntax is the same as jQuery, I consider this a dom scripting issue. To get rid of elements which are not representing anything, but wrapping other stuff (like the div in <div><p>blah</p></div> I came up with this selector: ['div:not([align][class][id][style][title][dir][lang][onclick][ondblclick][onmousedown] [onmouseup][onmouseover][onmousemove][onmouseout][onkeypress][onkeydown][onkeyup])'] which looks quite monstrous for a selector simply aming on Divs which just do not have any (valid) attribute. I guess there must be a more straight-forward way to accomplish that, right? Edit: Oh, and I just noticed that it even doesn't do wat I intended to ...

    Read the article

  • [webbrowser component]

    - by Eduardo Ghidini
    I'm using webbrowser component to show an page of articles. My webbrowser will, if the user read an article, to mark it like read. So, i'm need to each articles of the page (these articles are dynamic) and verify, in a local xml how articles are read.To article read i'm set a determinated css class,and if not, another css class. To do it, i'm checking all elements of type "DIV" in page using this code line: HtmlElementCollection col = webBrowser.Document.GetElementsByTagName("div"); I'm wanna filter the div's to get only 'divs' that i will change and not all div's of page Somebody can help me? Thanks

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >