Search Results

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

Page 10/46 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Do static / relative divs accept height in %

    - by Crimson
    I have a div which needs to be positioned statically / relatively. When it has both height and width defined in %, the browser (FF) ignores the height set and renders a very small div. However, when I set the height in px (approximately same calculated value), it works smoothly. The width defined in % works perfectly. I need the height to be defined in % as well - due to resolution / scaling issues.

    Read the article

  • After replacing all tables in an old website with divs, what other steps should I take?

    - by guisasso
    I have designed a website a few years back, and it ranks pretty well, customer is happy, no problems there. I took one of the pages and replaced manually all the tables with divs, used structured data and got the website to look exactly the same. I would like to know, what other steps should I take to improve or at least not hurt this page's rank, or if perhaps I should juts not bother altogether. What are best practices here? The page is not live yet. Thanks.

    Read the article

  • How to use jQuery to show/hide divs based on radio button selection?

    - by manoj382
    Hello, I have some radio buttons and I'd like to have different hidden divs show up based on which radio button is selected. Here's what the HTML looks like: <form name="form1" id="my_form" method="post" action=""> <div><label><input type="radio" name="group1" value="opt1">opt1</label></div> <div><label><input type="radio" name="group1" value="opt2">opt2</label></div> <div><label><input type="radio" name="group1" value="opt3">opt3</label></div> <input type="submit" value="Submit"> </form> .... <style type="text/css"> .desc { display: none; } </style> .... <div id="opt1" class="desc">lorem ipsum dolor</div> <div id="opt2" class="desc">consectetur adipisicing</div> <div id="opt3" class="desc">sed do eiusmod tempor</div> And here's my jQuery: $(document).ready(function(){ $("input[name$='group2']").click(function() { var test = $(this).val(); $("#"+test).show(); }); }); The reason I'm doing it that way is because my radio buttons and divs are being generated dynamically (the value of the radio button will always have a corresponding div). The code above works partially - the divs will show when the correct button is checked, but I need to add in some code to make the divs hide again once the button is unchecked. Thanks!

    Read the article

  • next previous button in div jquery mobile

    - by satine kianne
    i have a total of 11 div in my app. what i want to do is to display 3 divs in between 2 permanent div it should look like this |first permanent div| |div 1| |div 2| |div 3| |second permanent div| |previous| |next| when i click on next is should look like this |first permanent div| |div 2| |div 3| |div 4| |second permanent div| |previous| |next| and so on. and when im not div 1,2,3 the previous should be disabled and when im no 7,8,9 the next should be disabled. but i cant make it i'm using this fiddle as a sample http://jsfiddle.net/WGkPV/1/ its working but only one div is shown in the center of my two permanent div which is not in my plan.im getting like this |first permanent div| |div 1| |second permanent div| |previous| |next| any suggestion will be taken seriously. here is the code of the fiddle im working on as tutorial $(document).ready(function () { var divs = $('.mydivs>div'); var now = 0; // currently shown div divs.hide().first().show(); $("button[name=next]").click(function (e) { divs.eq(now).hide(); now = (now + 1 < divs.length) ? now + 1 : 0; divs.eq(now).show(); // show next }); $("button[name=prev]").click(function (e) { divs.eq(now).hide(); now = (now > 0) ? now - 1 : divs.length - 1; divs.eq(now).show(); // or .css('display','block'); //console.log(divs.length, now); }); }); <div class="mydivs"> <div>div 1</div> <div>div 2</div> <div>div 3</div> <div>div 4</div> </div>

    Read the article

  • What causes extra space and random alignment in my divs using the 960 grid system?

    - by tomdot
    I have an issue where elements in divs seemingly align randomly, not responding to any align tag, and where divs create extra space above or below its element. I'm using the 960 grid system and I have not altered the stock CSS file lest my fingers blow it up. I've put up a test page here, and please excuse some of the dodgy code :-D It's still in it's very early stages (as am I), but I don't feel I can move on until I can comfortably understand what is causing the issue. The best example on that page is the bottom horizontal bar and elements underneath. The bar adds a few pixels of dead space, and the elements below that align to different parts of their respective divs. Why is it that elements seemingly do not standardise their alignment given no instruction, and what causes extra space again where no instruction was given? My own thought was to relatively position everything individually, but I'm worried this will cause issues and 'break' the grid. Other than that, I unno. Thanks

    Read the article

  • CSS: How to get two DIVs side by side with automatic height, to the height of their container?

    - by Jake Petroules
    I am designing a website for a client, and I am trying to get two side-by-side DIVs to adjust to 100% of their container. I've got the side-by-side done, but I can't get the right DIV to be the same height as the left one. You can view the problem here: http://campusmomlaundry.petroules.com/ The "challenges" and "benefits" DIVs should be side-by-side and the same height, without manually specifying the height. How can I do this?

    Read the article

  • How to have other divs with a flash liquid layout that fits to the page?

    - by brybam
    Basically the majority of my content is flash based. I designed it using Flash Builder (Flex) and Its in a liquid layout, (everything is in percents) and if im JUST embedding the flash content it scales to the page fine, and i have the flash content set to have a padding of 50 px. I put a header div in fine with no problems, but I have 2 problems, the first being the footer div seems to cover up the buttom of the flash content in IE, but it looks just fine in chrome. How can I solve this? I'm using the stock embed code that Flex provides, I tried to edit the css style for the div which I think is #flashContent and give it a min width and min height but it didnt seem to work, actually anything I did to #flashContent didn't seem to do anything, maybe its not the div i need to be adding that attribute to... And my other problem is I dont even know where to start when it comes to placing a div thats 280width by 600height colum to the right side of the flash content. If i could specify a size for the flash content, and the float it left, and float the colum right, and clear it with the container div id be just fine....But remember the flash content is set to 100% Scale (well techically 100%x80% because it looked better that way). Does anyone know how I can start to deal with creating a more complex scaleable flash layouts that includes other divs? ALL WELL MAINTAINING IE SUPPORT? IE is ruining my life. Here's the code I'm using: (or if it will help you visualize what im trying to do here's the page where im working on setting this up http://apumpkinpatch.com/textmashnew/) <!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" lang="en" xml:lang="en"> <head> <title>TextMixup</title> <meta name="google" value="notranslate"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css.css" rel="stylesheet" type="text/css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> <script src="../appassets/scripts/jquery.titlealert.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-19768131-2']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); function tabNotification() { $.titleAlert('New Message!', {interval:200,requireBlur:true,stopOnFocus:true}); } function joinNotification() { $.titleAlert('Joined Chat!', {interval:200,requireBlur:true,stopOnFocus:true}); } </script> <!-- BEGIN Browser History required section --> <link rel="stylesheet" type="text/css" href="history/history.css" /> <script type="text/javascript" src="history/history.js"></script> <!-- END Browser History required section --> <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> var swfVersionStr = "10.2.0"; var xiSwfUrlStr = "playerProductInstall.swf"; var flashvars = {}; var params = {}; params.quality = "high"; params.bgcolor = "#ffffff"; params.allowscriptaccess = "sameDomain"; params.allowfullscreen = "true"; var attributes = {}; attributes.id = "TextMixup"; attributes.name = "TextMixup"; attributes.align = "middle"; swfobject.embedSWF( "TextMixup.swf", "flashContent", "100%", "80%", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes); swfobject.createCSS("#flashContent", "display:block;text-align:left;"); </script> </head> <body> <div id="homebar"><a href="http://apumpkinpatch.com"><img src="../appassets/images/logo/logoHor_130_30.png" alt="APumpkinPatch HOME" width="130" height="30" hspace="10" vspace="3" border="0"/></a> </div> <div id="topad"> <script type="text/javascript"><!-- google_ad_client = "pub-5824388356626461"; /* 728x90, textmash */ google_ad_slot = "1114351240"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <div id="mainContainer"> <div id="flashContent"> <p> To view this page ensure that Adobe Flash Player version 10.2.0 or greater is installed. </p> <script type="text/javascript"> var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://"); document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='" + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" ); </script> </div> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="80%" id="TextMixup"> <param name="movie" value="TextMixup.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="TextMixup.swf" width="100%" height="80%"> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <!--<![endif]--> <!--[if gte IE 6]>--> <p> Either scripts and active content are not permitted to run or Adobe Flash Player version 10.2.0 or greater is not installed. </p> <!--<![endif]--> <a href="http://www.adobe.com/go/getflashplayer"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /> </a> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </noscript> <div id="convosPreview">This is a div I would want to appear as a colum to the right of the flash content that can scale</div> <!---End mainContainer --> </div> <div id="footer"> <a href="../apps.html"><img src="../appassets/images/apps.png" hspace="5" vspace="5" alt="random chat app apumpkinpatch" width="228" height="40" border="0" /></a><a href="https://chrome.google.com/webstore/detail/hjmnobclpbhnjcpdnpdnkbgdkbfifbao?hl=en-US#"><img src="../appassets/images/chromeapp.png" alt="chrome app random video chat apumpkinpatch" width="115" height="40" vspace="5" border="0" /></a><br /><br /> <a href="http://spacebarup.com" target="_blank">©2011 Space Bar</a> | <a href="../tos.html">TOS & Privacy Policy</a> | <a href="../help.html">FAQ & Help</a> | <a href="../tips.html">Important online safety tips</a> | <a href="http://www.facebook.com/pages/APumpkinPatchcom/164279206963001?sk=app_2373072738" target="_blank">Discussion Boards</a><br /> <p>You must be at least 18 years of age to access this web site.<br />APumpkinPatch.com is not responsible for the actions of any visitors of this site.<br />APumpkinPatch.com does not endorse or claim ownership to any of the content that is broadcast through this site. </p><h2>A Pumpkin Patch is BRAND NEW and will be developed a lot over the next few months adding video chat games, chat rooms, and more! Check back often it's going to be a lot of fun!</h2> </div> </body> </html> myCSS: html, body { height:100%; } body { text-align:center; font-family: Helvetica, Arial, sans-serif; margin:0; padding:0; overflow:auto; text-align:center; background-color: #ffffff; } object:focus { outline:none; } #homebar { clear:both; text-align: left; width: 100%; height: 40px; background-color:#333333; color:#CCC; overflow:hidden; box-shadow: 0px 0px 14px rgba(0, 0, 0, 0.65); -moz-box-shadow: 0px 0px 14px rgba(0, 0, 0, 0.65); -webkit-box-shadow: 0px 0px 14px rgba(0, 0, 0, 0.65); margin-bottom: 10px; } #mainContainer { height:auto; width:auto; clear:both; } #flashContent { display:none; height:auto; float:left; min-height: 500px; min-width: 340px; } /**this is the div i want to appear as a column net to the scaleable flash content **/ #convosPreview { float:right; width:280px; height:600px; }

    Read the article

  • Can I flow divs down the page instead of across it?

    - by Brabster
    If I have a collection of div elements, I can use CSS to have them flow across the page and overflow onto the next line. Here's a simple example: <html> <head> <title>Flowing Divs</title> <style type="text/css"> .flow { float: left; margin: 4em 8em; } </style> </head> <body> <div class="container"> <div class="flow">Div 1</div> <div class="flow">Div 2</div> <div class="flow">Div 3</div> <div class="flow">Div 4</div> <div class="flow">Div 5</div> <div class="flow">Div 6</div> <div class="flow">Div 7</div> <div class="flow">Div 8</div> </div> </body> </html> Is it possible to have the divs flow down the page instead of across it, so that they would flow down columns not along lines, but still occupy the same space as they would if they flowed across? So for the example above, if they flowed into two lines of four divs, could I get the first column to contain Div1 and Div2 instead of Div1 and Div5?

    Read the article

  • Javascript Replace Child/Loop issue

    - by Charles John Thompson III
    I have this really bizarre issue where I have a forloop that is supposed to replace all divs with the class of "original" to text inputs with a class of "new". When I run the loop, it only replaces every-other div with an input, but if I run the loop to just replace the class of the div and not change the tag to input, it does every single div, and doesn't only do every-other. Here is my loop code, and a link to the live version: live version here function divChange() { var divs = document.getElementsByTagName("div"); for (var i=0; i<divs.length; i++) { if (divs[i].className == 'original') { var textInput = document.createElement('input'); textInput.className = 'new'; textInput.type = 'text'; textInput.value = divs[i].innerHTML; var parent = divs[i].parentNode; parent.replaceChild(textInput, divs[i]); } } }

    Read the article

  • jQuery sparklines iterate over div

    - by ßee
    I have an array of divs and I want to iterate over each div and pass it to sparklines. like so: var divs = $("#wrapper>div"); var data = ["1:2:3:4", "4:3:2:3:1"]; var i; for(i = 0; i<data.length; i++){ divs[i].sparkline(data[i]); } I get the error "divs[i].sparkline" is not a function. But if I do this divs.sparkline([1,2,3,4]); its fine all the divs get the linegraph but with the same data. Does anyone have any suggestions but how to use sparkline when iterating over divs? Thanks!

    Read the article

  • From concept to reality. Teach me how to CSS style my divs [closed]

    - by unixman83
    I have the html layout of my simple web page below (commented). What css do I add to <div> classes to get the rendering that I want? I want to learn. Give me the CSS file for it please. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>My Website</title> </head> <body> <div class="outer"> <!--Outer content box 750px wide--> <div class="header"> The heading of the page. </div> <div class="main"> <div class="leftbar"> A sidebar on the left with categories. </div> <div class="content"> The main content of the page. </div> </div> </div> </body> </html>

    Read the article

  • Style common group of divs in one css statement.

    - by Vafello
    I have a few divs created dynamically in Javascript.I was wondering if it is possible to style them all at once. #somediv { background-color: #F2F5FC; border-style:solid; border-bottom:thin dotted #33ccff; } #somediv2 { background-color: #F2F5FC; border-style:solid; border-bottom:thin dotted #33ccff; } ...and so on (this can be even 50 divs) I would like to change this to something like: #somediv* { background-color: #F2F5FC; border-style:solid; border-bottom:thin dotted #33ccff; }

    Read the article

  • CSS - postion: absolute; - auto height

    - by superUntitled
    I am having a problem with some div's The outer div has a min-height, but the inner divs are all varying heights. Because the inner divs are absolute positioned, they do not affect the outer divs height. Is there a way to make these inner divs affect the height of the outer div? The reason I am styling these divs with position:absolute is so that they all start at the top of the container div.

    Read the article

  • CSS: How to make a Div of text underneath another Div selectable?

    - by jesse
    Hi, I have a few empty Divs on a page that are basically empty boxes to help me position some stuff to make a "liquid" website. Now I've got content underneath these Divs but I can't highlight/click on the links because these empty Divs are blocking it. I've got a reason I need to have the empty Divs to be on the top layer so I need a way to "click through" these Divs. What can I do? Thanks.

    Read the article

  • CSS Div Width Problem - Lining divs... widths seem to be off in IE7

    - by jlrolin
    So far, I'm doing this programmatically using VB.net/ASP.net: 'Create Container Div Dim ContainerDiv As New HtmlGenericControl("div") ContainerDiv.Style("width") = "100%" ContainerDiv.Style("clear") = "both" ContainerDiv.Style("text-align") = "left" ContainerDiv.Style("margin") = "0" 'Create Expand/Collapse Image Dim img As New Image img.ImageUrl = Page.ResolveUrl("~/images/minus99.jpg") img.Attributes.Add("onclick", "change(this.parent);") 'Create Company Display Dim lbl As New Label lbl.Text = Parsetext(pc.NAME) lbl.Font.Bold = True lbl.Style("font-size") = "16px" Dim NameDiv As New HtmlGenericControl("div") 'NameDiv.Style("background-color") = "#F0D3D3" NameDiv.Style("width") = "375px" NameDiv.Style("float") = "left" NameDiv.Style("margin") = "0" NameDiv.Style("display") = "block" NameDiv.Controls.Add(img) NameDiv.Controls.Add(lbl) ContainerDiv.Controls.Add(NameDiv) Dim SetupDiv As New HtmlGenericControl("div") SetupDiv.Style("background-color") = "#F0D3D3" SetupDiv.Style("width") = "210px" SetupDiv.Style("float") = "left" SetupDiv.Style("margin") = "0" SetupDiv.Style("display") = "block" 'SetupDiv.Style("position") = "fixed" ContainerDiv.Controls.Add(SetupDiv) Dim UsedDiv As New HtmlGenericControl("div") UsedDiv.Style("background-color") = "#CFF5CE" UsedDiv.Style("width") = "140px" UsedDiv.Style("float") = "left" UsedDiv.Style("margin") = "0" UsedDiv.Style("display") = "block" 'UsedDiv.Style("position") = "fixed" ContainerDiv.Controls.Add(UsedDiv) Dim RemDiv As New HtmlGenericControl("div") RemDiv.Style("background-color") = "#BEE0F7" 'RemDiv.Style("position") = "absolute" RemDiv.Style("width") = "210px" RemDiv.Style("float") = "right" RemDiv.Style("padding") = "0" RemDiv.Style("margin") = "0" RemDiv.Style("display") = "block" 'RemDiv.Style("position") = "fixed" ContainerDiv.Controls.Add(RemDiv) This should give me four DIVS inside a container DIV. Here's what it's coming out as: The correct blocks above the non-inline blocks are from a table with the same exact widths as the ones I'm using on the Divs. There isn't any CSS adding pixels to them, I don't think. I need to line these up, and I can't figure out where my problem is here. Any help would be appreciated.

    Read the article

  • Help me make a jquery AJAXed divs' links work like an iframe.

    - by Dave
    I want to make a few divs on the same page work similar to iframes. Each will load a URL which contains links. When you click on those links I want an AJAX request to go out and replace the div's html with new html from the page of the clicked link. It will be very similar to surfing a page inside an iframe. Here is my code to initially load the divs (this code works): onload: $.ajax({ url: "http://www.foo.com/videos.php", cache: false, success: function(html){ $("#HowToVideos").replaceWith(html); } }); $.ajax({ url: "http://www.foo.com/projects.php", cache: false, success: function(html){ $("#HowToProjects").replaceWith(html); } }); This is a sample of code that I'm not quite sure how to implement but explains the concept. Could I get some help with some selectors(surround in ?'s) and or let me know what is the correct way of doing this? I also want to display a loading icon, which I need to know where the right place to place the function is. $(".ajaxarea a").click(function(){ var linksURL = this.href; // var ParentingAjaxArea = $(this).closest(".ajaxarea");; $.ajax({ url: linksURL, cache: false, success: function(html){ $(ParentingAjaxArea).replaceWith(html); } }); return false; }); $(".ajaxarea").ajaxStart(function(){ // show loading icon });

    Read the article

  • Rails: How to name and create unique divs within a loop?

    - by sscirrus
    I have a view with a div that is looped many times. Each of the created divs need to have a unique ID so I can access them specifically (at the moment, all my divs have the same ID specified in html so whenever I try to access a specific div it just finds the first one). This is the version that I currently have (multiple 'rowBox'es are not discernible). <% @customers.each do |customer| %> <div id="customer" class="rowBox"> ... </div> <% end %> I would like to be able to do something like: <% @customers.each do |customer| %> <div id="box<%=customer.id%>"> ... </div> <% end %> This doesn't seem to work. Any ideas on how to accomplish this?

    Read the article

  • Centered DIV w/ width dependant on text, buffered by two divs that should fill the containing DIV

    - by Andrew Thompson
    I have been wracking my brains on this seemingly small issue the whole day. My web dev friends are baffled and I could not find a suitable answer in my search of this site and others (though, I could have missed it somewhere along the way). Here's the problem: 3 DIVS within one fixed-width container DIV The center DIV has text that will be different on other sites The center DIV needs to be centered, and no larger than the text it contains. This is what I'd like to end up with The basic HTMl: <div id="container" > <div id="left" ></div> <div id="center" >Text inside center should resize this block</div> <div id="right" ></div> </div> Below, I removed most of the styles I have tried. This CSS currently centers the DIV (if I set it as an inline block), but I need the other divs to fill the left and right space remaining: #container { width:750px; text-align:center; } #left { background-color:#E85355; } #center { background-color:#CDD7D7; display:inline-block; } #right { background-color:#65A8A6; } I've tried floating, no-wrap, overflow, etc. Thanks a million to whomever can offer some help! JSFiddle Link

    Read the article

  • How to align 3 divs (left/center/right) inside another div?

    - by serg555
    I want to have 3 divs aligned inside a container div, something like this: [[LEFT] [CENTER] [RIGHT]] Container div is 100% wide (no set width), and center div should remain in center after resizing the container. So I set: #container{width:100%;} #left{float:left;width:100px;} #right{float:right;width:100px;} #center{margin:0 auto;width:100px;} But it becomes: [[LEFT] [CENTER] ] [RIGHT] Any tips?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >