w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
jQuery: Adjust the height of the overall container dynamically
This line var originalHeight = $('#filter-results').height(); will need to be outside your click() event, and should be done only once on $(document).ready()

Categories : Javascript

what is the better way to position two elements in a container using CSS? (one on the left and one on the right of its container)
i think there wont be any problem ..this can be also achieved in may other ways you can also use div.wrap to wrap #first & #second then you could use display:inline-block; in #first & #second while display:inline; in div.wrap and also see should you use inline-block as a substitute of float and also float vs inline-block you could use float:left; only in #first then #second would inherit it.it will give you side by side contents you can also use display:table-row; for div.wrap and display:table-cell; for #first & #second.but its better to avoid

Categories : HTML

jquery adjust size div with text inside div container resizable
Capture the length and width of the div as it is being resized, and input those parameters into a calculation which changes the font size of div#intern. You should place a lower limit on how small the length and width of the container div can be. Play around with different scaling values to make a formula which yields a corresponding font size which works. If you are using jQuery UI, then trigger the calculation on the resize() event for your implementation of Resizable.

Categories : Jquery

Why can't I adjust my div's position
You have an equals sign rather than a colon in your position declaration which is causing the page to ignore it. Change that and it'll work! EDIT: Thanks for fixing my awful terminology Pavlo, can't believe I did that :P

Categories : CSS

how to adjust position of div
Here is Fiddle Add style to your search div. i.e. Make <div id='search'> as <div id='search' style='float:left'> Then this will place your demo is apper right side of the search div

Categories : HTML

How to adjust components position in a line
As @mKorbel comments, the five pixel vertical space is added by the default layout of JPanel, FlowLayout. The image below shows vgap set to zero. JPanel eastPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 0));

Categories : Java

adjust text in the center with position dodge
I'm still feel like I'm at the start of learning to use ggplot2 but maybe you can adapt what I've done to a plot that looks closer to what you want. If anyone more experienced could direct me in a better style of coding for this problem I'd appreciate it. n_in_group <- summary(as.factor(dat$group)) group_adjust <- c() for(i in seq(n_in_group)) { if(n_in_group[i] == 1) {group_adjust <- c(group_adjust,0) } if(n_in_group[i] == 2) {group_adjust <- c(group_adjust,-1,1) } if(n_in_group[i] == 3) {group_adjust <- c(group_adjust,-1,0,1)} } library(ggplot2) ggplot( dat,aes(x=factor(group),y=difference) ) + geom_bar( width=.75,aes(fill=as.factor(Mutation)),stat="identity", position="dodge") + geom_text(aes(label=Mutation, vjust = group_adjust),a

Categories : R

Android adjust top position of a ListView's ScrollBar
This seems to work OK: It's a copy of ListView.computeVerticalScrollOffset with two modifications: Subclass ListView, modify your layout to use your subclass Copy ListView.computeVerticalScrollOffset to your custom ListView Replace member variable references with getters (see below) Modify the offset method to account for the adjustment you want to use (see below) YourListView.java: @Override protected int computeVerticalScrollOffset() { final int firstPosition = getFirstVisiblePosition(); final int childCount = getChildCount(); if (firstPosition >= 0 && childCount > 0) { if (isSmoothScrollbarEnabled()) { final View view = getChildAt(0); final int top = view.getTop(); int height = view.getHeight(); if (

Categories : Android

Adjust position of Arabic text on an image
solution : list($IW, $IH) = $this -> dimensions($ID); list($FW, $FH) = $this -> arabttfBox($Size, $Angle, $Font, fagd($string)); return imagettftext($this -> image[$ID], $Size, $Angle, $IW-$FW-$X, $Y, imagecolorallocate($this -> image[$ID], $R, $G, $B), $Font, fagd($string));

Categories : PHP

Adjust element position on negative left value
How are the three divs placed adjacent to each other? If all three divs are floated, you can use a negative margin-left on the middle div rather than a negative left. See: http://jsfiddle.net/Z2rB4/7/

Categories : HTML

Adjust position of a group of adjacent divs in non-linear fashion
Here's a version that I believe does what you are looking for. The first thing I did was to refactor the top calculation so that both the initialization and the drag handlers would get the same results. Rather than calculate the positions of the child divs based on their offset to the document, I changed the logic to use position relative to their container. I also remove z-index as the child divs already being added the parent with the correct stacking order - the left most child is the last element in the container. Calculating the height of each child depended on whether #queue's current position was to the left or right of its origin. I also change the iteration logic to behave the same to simplify calculating the current elements starting offset: $($('.newOne').get().reverse()

Categories : Javascript

Resizing container div when inner div position changes
try giving the position of inner div to position:absolute in relative with the parent div then you can play around with the inner divs by adjusting the top,left,bottom and right properties // css body{ background: url("http://1.bp.blogspot.com/-OowkzBiSOJU/Ud0G3T325lI/AAAAAAAACfY/syhVEMuuSOw/s1600/tiny_grid.png") repeat scroll 0 0 transparent; color: #666; height: 100%; padding: 0; font-family: 'Lora',Georgia,Serif; font-size: 18px; line-height: 29px; border-top: 5px solid #4690B3; } .clr { clear:both; float:none; } .ct-wrapper { padding:0px 20px; position:relative; max-width:1230px; margin: 0 auto; } .header-wrapper { background: #fff; border-bottom: 1px solid #ccc; display: inline-block; float: left; width: 100%; } /***** Optin Form CSS *****/ .opt-in .inner { bac

Categories : CSS

How to position a div on bottom of box flex container
http://jsfiddle.net/xuscrus/AeRVs/ display:-webkit-box; display:box; May be causes problems. I hope my solution will useful to you

Categories : HTML

position fixed but relative to a container
When using position:fixed; you are positioning the elements relative to the browser window. To use your own parent container, you'll need to set #in and #out to use position:absolute; and then wrap them in a container, let's say #wrap, that has position:relative; set on it. Edit: here's a fiddle: http://jsfiddle.net/ktAAa/

Categories : CSS

fixed position div inside div container
Screenshot: This is how position: fixed; behaves: MDN link Do not leave space for the element. Instead, position it at a specified position relative to the screen's viewport and doesn't move when scrolled. When printing, position it at that fixed position on every page. Hence, to get what you want you have to use something more than fixed positioning: Probably this: demo .wrapper { width:100% } .container { width:300px; margin:0 auto; height:500px; background:#ccc; } .element { background:#f2f2f2; position:fixed; width:50px; height:70px; margin-left:250px; border:0px solid #d6d6d6; }

Categories : CSS

JQuery, keep inner
If you give #num-text a height, you can vertically align it to the center using the absolute positioning you already have on it: #num-text { position:absolute; text-align:center; color:#eee; font-size:24px; width:100%; height: 24px; top:50%; margin-top:-12px; } See fiddle here: http://jsfiddle.net/hZSKA/1/ As a side note, it's probably possible to do this same effect using CSS3 but that may not be backwards compatible with older browsers.

Categories : Javascript

animate the images container to the position where is going to be on fullview
Simple, just make left as 0 and bottom as 0 that should do it. Untested code var thumbsstyle = { left: 0 bottom: 0 }; $thumbsWrapper.stop().applyStyle(thumbsstyle, $.extend(true, [], { duration: animspeed, easing: animeasing }));

Categories : Jquery

How to position float items relative to bottom of container DIV?
Working Prototype The following might be a way of achieving this design: The HTML could be: <div class="header" id="header"> <img src="http://placekitten.com/500/20" width="435" height="30" class="pageName"> <!--margin-top: 72px;--> <!--menu. Last item in line is 1st--> <div class="nav-wrap"> <img src="http://placekitten.com/100/10" width="68" height="10" class="menu" > <img src="http://placekitten.com/100/10" width="68" height="10" class="menu" > <img src="http://placekitten.com/100/10" width="68" height="10" class="menu" > <img src="http://placekitten.com/100/10" width="68" height="10" class="menu" > <img src="http://placekitten.com/100/10" width="68" height="10" class="men

Categories : CSS

Container stick or stack to header. position fixed
In your .header class you have to add top: 0px: .header { position: fixed; left: 0; right: 0; height: 120px; background: #232323; z-index: 10; top: 0px; }

Categories : CSS

EaselJS, how to position Container , Text center to canvas?
Containers don't have a width or height, so in that case you would have to calculate the width and height from its' child-pobjects (if those are all bitmaps or bitmapanimations) For the Text you can use getMeasuredWidth() and getMeasuredHeight() http://www.createjs.com/Docs/EaselJS/classes/Text.html

Categories : HTML

Position fixed element with percentage width relative to container
You can get the effect that you want as follows. Your HTML snippet is good as is: <div id="content"> <section> <h1>Heading 1</h1> <p>...</p> </section> <section> <h1>Heading 2</h1> <p>...</p> </section> </div> and the CSS is good but just requires some explanation: #content { overflow: visible; /* default, but important to notice */ } section { float: left; width: 25%; } h1 { position: fixed; width: 25%; background: #00FF00; text-align: center; } and the demo fiddle: http://jsfiddle.net/audetwebdesign/4zLMq/ How This Works Your #content block takes up the remaining width to the right of your 200px left floated sidebar.

Categories : HTML

Repeating background not filling container div with relative absolute position with percentages
This is what you want? Fiddle Just add this CSS rule in the div.container element background: url('Your URL') repeat; As you can see, I used the shorthand property. BTW, just add the height in the html and body to 100% (you'll obtain the same result that adding the height and width properties). html, body { height: 100%; }

Categories : CSS

Centering a fixed position html element relative to parent container not the browser
Two things: You need to use position: absolute on your footer. You need to specify a position property on your wrapper in order to give it layout. e.g. http://jsfiddle.net/WzxGA/ #wrapper { width: 75%; max-width: 800px; height: 100%; min-height:500px; margin: 0 auto; position:relative;} #one {height: 100px; background-color: red } #two {height: 100px; background-color: blue } #three {height: 100px; width: 100%; max-width: 1200px; background-color: green; position: absolute; bottom: 0} #three p {text-align: center;}

Categories : HTML

Bootstrap dropdown position fixed with container border-radius vanishing beyond border in IE
Instead of setting overflow for the container, I set it to the ul and made that fill it's parent. See fiddle http://jsfiddle.net/b3XA2/11/ .one > ul{ overflow-y:scroll; margin:0; height: 100%; }

Categories : CSS

How to position a container view so it's the same distance from top of screen on iPhone 4 & iPhone 5?
If you're using layout constraints, just give the container view a fixed constraint to the top and bottom of the main view, and no fixed height. This will cause the view to expand and contract depending on the screen size. Depending where your scroll view is, one of the constraints might have to be to it, rather than the top or bottom of the screen (So, if the scroll view were on top, it would have a constraint to the top, a fixed height, and a spacing constraint to the container view below it. The container view would then just need one to the bottom of the superview).

Categories : IOS

Left div container as links/nav which upon click of a link, displays content in right div container?
This JSFiddle may be helpful to you. or code : HTML : <div id="wrapper"> <div id="left_div"> <a href="#" id="link1">Link1</a> <a href="#" id="link2">Link2</a> <a href="#" id="link3">Link3</a> <a href="#" id="link4">Link4</a> </div> <div id="right_div"> <div class="container"> </div> </div> </div> Javascript ( Jquery ) $(document).ready(function(){ $("#link1").click(function(){ animateDiv("right_div .container"); $("#right_div .container").html("You have Click on line1"); }); $("#link2").click(function(){ animateDiv("right_div .container"); $("#right_div .container").html("You have Cl

Categories : Javascript

Can't create container in Azure blob storage with the same name as a deleted container
Although this is an old thread, I had the same question a few days ago, and wanted to post my findings: http://msdn.microsoft.com/en-us/library/azure/dd179431.aspx states under the Exceptions to Default Timeout Interval section: A container that was recently deleted cannot be recreated until all of its blobs are deleted. Depending on how much data was stored within the container, complete deletion can take seconds or minutes. If you try to create a container of the same name during this cleanup period, your call returns an error immediately.

Categories : Python

Container-Bound Google Script not executing even after the container has been shared
The button will run under the users permission. If its anonymous it wont run if it needs any api permission (like reading the spreadsheet) since there is no user. For non anonymous users, you need to add a menu item that will trigger the google permission dialog (just do any dumb api call from it). After the user approves it will be able to click the image button

Categories : Google Apps Script

Organize container content by container height
There is a standard algorithm Subset Sum Problem for solving this. Problem says You have n integers. Divide n integers into two sets such that |Set1| - |Set2| is minimum. where |Set(i)| represents the sum of elements in ith set. I see you have a similar problem here. Assume your containers as two sets and each box height as an integer which is going to be put in that set. Problem is we have to divide the integers (boxes) in such a way that heights of two containers remain minimum. Relevant Links: Subset Sum Problem - Wiki Geeks for Geeks tutorial - Good One

Categories : Javascript

Is there any difference between using absolute position around a relative position wrap and an absolute position around a static position wrap?
If you don't wrap an absolute positioned element around a relatively positioned object, in your viewport, top will be top, but if you zoom in or zoom out, it will be top of the viewport and independent of your layout, weather in case of relatively positioned objects, if an absolute positioned object is wrapped around a relatively postioned object, it will be on top under the bounds of the relatively positioned object(s). For Instance, Let us take three div tags as mentioned in the question with ids, box_1, box_2 and box_3 Let us assume the below CSS and HTML for the three div's The CSS: #box_1 { position: static; width: 200px; height: 100px; background: yellow; top:0px; left:0px; } #box_2 { position: relative; width: 1000px; height: 100px; background: red; } #box_3 {

Categories : CSS

I want to add class in the container while droping a div in the container
Check jQuery UI documentation for droppable method used with sortable. You can see the example here.

Categories : Jquery

show container on hover different container
Console gives an error on your facebook jssdk code. Uncaught TypeError: Cannot call method 'getElementsByTagName' of null on line 8: button = container.getElementsByTagName( 'h1' )[0], Try putting it below the page so you give your content the chance to load. Your javascript should work until there.

Categories : HTML

Bootstrap container-fluid and container
It is, but you will need to remove it from the flow of the container either by placing it outside of it, or using CSS to control it by giving it position:absolute etc. Something like: <div class="logo"> <h1> <a href=""> hello.</a></h1> </div> <style> .logo { position:absolute; top:100px; left:100px; } </style> <div class="container-fluid full-width"> <div class="row-fluid header-top"> <div class="container"> <div class="menu span8"> <div class="navbar"> <ul class="nav" id="nav"> <li><a href="#"> Home </a></li>

Categories : CSS

Is there a better way to check if a STL container is a multi* container
Seeing as there are a small finite number of std::multi* containers, you can just list them: #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <type_traits> template <typename Container> struct is_multi_container : std::false_type {}; template <typename T, typename Compare, typename Alloc> struct is_multi_container<std::multiset<T, Compare, Alloc>> : std::true_type {}; template <typename T, typename Compare, typename Alloc> struct is_multi_container<std::multimap<T, Compare, Alloc>> : std::true_type {}; template <typename T, typename Compare, typename Alloc> struct is_multi_container<std::unordered_multiset<T, Compare, Alloc>> : std::true_ty

Categories : C++

Adding subview to superview shared by a container view resizes container view
When you're using auto layout, you can't set the frames of views you load from a xib or storyboard. Auto layout sets the frames, and it ignores changes you make to the frames. You need to update the constraints on those views if you need to move or resize them directly. You can create an outlet pointing to an NSLayoutConstraint in your view controller, and connect the outlet to the appropriate constraint in your xib or storyboard. Then you can change the constraint's constant property to change the view's position or height.

Categories : IOS

Bind click event to container, but exclude element within container from event logic
You need to prevent event propagation from the button $('div button').click(function(event){ event.stopPropagation() }) Demo: Fiddle

Categories : Javascript

How the spring container starts and ways to load the spring container
The simplest solutions is to use a ContextLoaderListener: <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext*.xml</param-value> </context-param> See http://static.springsource.org/spring/docs/4.0.x/spring-framework-reference/html/web-integration.html for details.

Categories : Java

in R sampling a list of probabilities returns one position. How do I convert that position, to the element index?
Use which with argument arr.ind=TRUE to return the array indices. m <- array((1:27)*10, dim=c(3,3,3)) x <- sample(27, 1) x # [1] 20 which(m == m[x], arr.ind=TRUE) # dim1 dim2 dim3 # [1,] 2 1 3

Categories : R

Changing position of origin inside a window's Client area to get cursor position
The DPtoLP function converts device coordinates into logical coordinates. The conversion depends on the mapping mode of the device context, the settings of the origins and extents for the window and viewport, and the world transformation. http://msdn.microsoft.com/en-us/library/windows/desktop/dd162474(v=vs.85).aspx

Categories : Visual Studio 2010

How to detect change in orientation of android phone from horizontal position to vertical position?
You will need the Gravity Sensor: http://developer.android.com/guide/topics/sensors/sensors_motion.html In the absence of a Gravity Sensor you have to rely on Accelerometer and Gyroscope, I think.

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.