w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Vertical alignment in div with unknown parent height
You don't need to use float property when you are using display:table and table-cell. So just remove them from your inline style and then everything will work as expected. Js Fiddle Example

Categories : CSS

css vertically alignment inside a liquid height div?
Use position:absolute with a negative margin, demo here. #imgC{ width:100px; position:absolute; top:50%; margin-top:-50px; } I also see you're using calc for aligning the top/center/bottom divs, you can also achieve that without calc and still have IE6 compatibility. calc only works in very recent browsers.

Categories : CSS

Delphi XE4 dynamic panel alignment order
OK, now as official answer: When creating your panels assign a value for top (the height of the container, for example). Reason: When you create a component its top will always be 0. With two components with a top at 0 and alTop it is purely coincidental which component ends up on top in the end. See here for some code doing the trick: How to dynamically create controls aligned to the top but after other aligned controls?

Categories : Delphi

One div fixed height and another div remaining vertical space to make it 100% of window height
Do you want to this apply this css it matching your requirement body, html { min-height: 100%; } #container { margin: 0 auto; height: 400px; width: 400px; padding: 0px; border:1px solid #ccc; } #div-a { height: 16%; width: 96%; float: left; margin: 2%; background: #ddd888; } #div-b { float: left; min-height: 78%; width: 46%; margin: 0% 2% 2% 2%; background: #bbb; } #div-c { float: left; min-height: 78%; width: 48%; margin: 0% 2% 2% 0%; background: #000; } and html its help full for you <div id="container"> <div id="div-a"></div> <div id="div-b"></div> <div id="div-c"></div> </div>

Categories : HTML

HTML table with 100% of height, and the rows equally divided in height. How to make it possible?
You can position the table absolute. For example, give it the class "full-height", and then add the following css: table.full-height { position: absolute; bottom: 0; top: 0; left: 0; right: 0; } This will expand the table to the full height!

Categories : CSS

How can I make a div auto-adjust its height between two divs, according to window height using CSS/Javascript?
The correct way of ending <div> tag is by using </div>. Try this code- <body> <div style="position: fixed; top: 0px; left: 0px; width: 200px; height: 100%;"> <div style="float: left; height: 50px; width: 200px; background-color: green; position: fixed;"></div> <div style="float: left; height: 100%; width: 200px; background-color: red;"></div> <div style="float: left; bottom: 0px; left:0px; position: fixed; height: 50px; width: 200px; background-color: blue;"></div> </div> </body>

Categories : Javascript

how to make the min-height of body equal to screen.height
Alright, since that didn't work... You have an html element style found in your div id "center_wrapper" it is contained within div id "title". Change the element style of min-height to 450 as shown below: <fieldset id="center_wrapper" style="min-height: 450px;"> That should do the trick...

Categories : Javascript

How to make CSS height: 100% take effect in a varying height container?
if you tell the tag's parent tags (including html and body tags) to also be 100% height that should fix your issue. I added max-height as an option, I did not know if you wanted the container to run the length of the whole screen. http://jsfiddle.net/brandonbabb/SL3FC/ html, body { height:100% } .outer { border: 1px solid black; height: 100%; max-height: 500px } .col-left { float: left; background: cyan; width: 80%; height: 100%; } .col-right { float: left; width: 15%; background: yellow; height: 100%; } .clear { clear: both; }

Categories : HTML

How to make right side bar height go along with the height of the main content
your container seems to be fine and has a auto height so what is the problem here you see the fiddle http://jsfiddle.net/cancerian73/ZpZCD/ .container {background-color:#fc0;}

Categories : HTML

Make a
fill its parent
height, without specifying height on
I found a solution. By adding an inner div into each div.Key and using display: table; and display: table-cell; i would do what i need. Here is my code : .Layout { width: 1024px; /* TEST */ height: 480px; /* TEST */ } .Key { text-align: center; display: table; width: 100%; height: 100%; } .Key > div { display: table-cell; vertical-align: middle; } And : <table class="Layout"> <tbody> <tr> <td><div class="Key"><div>HEY</div></div></td> <td><div class="Key"><div>HEY</div></div></td> <td><div class="Key"><div>HEY</div></div></td> <td><div class="Key"><div&g

Categories : HTML

css floating element increase parent height but sibling with 100% height not working
Jquery solution, here's a Fiddle $(function() { var fHgt = $('#float').outerHeight(); $('#fill').css({ height: fHgt }); }); and here's a CSS solution #container { display: table; width: 500px; background-color: yellow; } #float { display: table-cell; width: 20%; background-color: green; } #fill { display: table-cell; width: 80%; overflow: hidden; background-color: red; }

Categories : HTML

how to make file alignment using fprintf in c?
As like printf() You need to use some left and right alignments printf() write output to stdout fprintf() write output to the given output stream; printf("%6d",num); // if num have 3 digits then adds three more spaces at left of num. like this only you need to use with fprintf() In your file you have only 6 digits in the maximum number. replace all %ld with %7ld and add after every 3 or 4 numbers to get perfect allignment fprintf(fpscrip," %7ld , %7ld , %7ld , %7ld , %7ld , %7ld , %7ld , %7ld , %7ld , %7ld , %7ld ",scripCode,tradeVolume,LTQ,LTR,OpenRate,CloseRate,HighRate,LowRate,TotBuyQty,To‌​tSellQty,LowerCircuitLimit,UpperCircuitLimit);

Categories : C

With fast enumeration and an NSDictionary, iterating in the order of the keys is not guaranteed – how can I make it so it IS in order?
Dictionaries are, by definition, unordered. If you want to apply an order to the keys, you need to sort the keys. NSArray *keys = [articles allKeys]; NSArray *sortedKeys = [keys sortedArrayUsingSelector:@selector(compare:)]; for (NSString *key in sortedKeys) { // process key } Update the way the keys are sorted to suit your needs.

Categories : IOS

Make div responsive and control text alignment
this is your solution html with css <html> <head> <title>test</title> <style> .main{ width:97%; border:1px solid #000; height:100px; padding:1%; } .subone{ width:30%; border:1px solid #000; float:left; height:100px; margin-right:2%; } .subtwo{ width:67%; border:1px solid #000; float:left; height:100px; } </style> </head> <body> <div class="main"> <div class="subone"> </div> <div class="subtwo"> </div> </div> </body> </html>

Categories : Javascript

Make boost::python respect data alignment
To control the allocation of C++ types, register a factory function as the Python object's constructor with make_constructor. Often times, custom allocation also implies custom deallocation, in which case boost::shared_ptr can be used to manage the lifetime of the object and invoke a custom dealloction strategy. This answer goes into more details, but here is a complete example with a basic custom allocator. #include <cstdlib> #include <boost/python.hpp> #include <boost/shared_ptr.hpp> /// @brief Basic custom allocator. template <typename T> class custom_allocator { public: typedef size_t size_type; typedef T* pointer; typedef T value_type; public: pointer allocate(size_type num, const void* hint = 0) { std::cout << "custom_allocato

Categories : C++

CSS Height working but min-height doesn't work
Yes this is a pain but that's how it works. Height can be inherited from positioned parents but not when these have a min-height property. Children of elements that have a min-height set to 100% cannot inherit their parent's height via percentage... http://stackoverflow.com/a/8468131/1491212 CSS2.1 specs : The percentage is calculated with respect to the height of the generated box's containing block. If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the value computes to 'auto'. Use position: relative; height: 100% on containers to work around the problem, and add min-height: 100%; to the deepest child.

Categories : HTML

How do I make self.view the full height of the view controller (occupies height of navigation bar and status bar as well)
I'm not sure if I totally follow what you want, but I think it's something along these lines: - (void) viewDidLoad { [super viewDidLoad] self.view.frame = [[UIScreen mainScreen] bounds]; // You may or may not want to reference [[UIDevice currentDevice] orientation], too // Other stuff, whatever you want to do... } Note, too, that you can turn-off auto-resize and constraints, if the problem you're having is related to those. In general, the view controller's view not-including the nav-bar, etc. isn't a good idea. If you're having trouble because of that, you might want to consider another design.

Categories : IOS

StyleConstants Text Background, Alignment Not Working Together
The issue is mixing paragraph and text attributes. There are two groups of attributes character attributes - font, font size, font color etc. and paragraph attributes like alignment, indents, line spacing, tab stops etc. Bot the groups are applied to different levels of hierarchy (Document structure levels). Character attributes are applied to leaves (text elements) but paragraph attributes are applied to parents of the leaves (paragraph elements). So StyledDocument has 2 methods setCharacterAttributes and setParagrapphAttributes to apply the attributes to proper level. Thus when you insert string attributes are applied to leaves so only character attributes has meaning.

Categories : Java

How to fix the width and height of div and make the content inside div resize to div's width and height?
The content of the iframe is generally unaware of it's "parent" container, thus the sizing of it's contents aren't guaranteed. If you want your iframe's content to be resized...this can only be accomplished through javascript if it's in the same domain. Or if its a different domain, the url would require parameters/logic and resize the content through javascript based on those parameters.

Categories : Jquery

Firefox Div Alignment Not Working; Works in Chrome, IE, & Safari
#contentbox { overflow: hidden; } ...will correct your issue. You have an uncleared float there, and overflow: hidden will clear it. Read more about block formatting context (the weird hidden CSS nuance that overflow: hidden applies) here.

Categories : Firefox

Dynamic Height UITableViewCell data wrong order
You've got to specify your dynamic cell heights in heightForRowAtIndexPath because the table view wants to know its content size up-front. Any changes you make to the cell's frame in cellForRowAtIndexPath will be overridden by the table view, so what you're attempting won't work. If your heights are derived from the cell's content, consider using the prototype approach outlined here. Also, if you can use a 3rd party library, check out TLIndexPathTools. It does dynamic cell height for free if your custom cell class implements the TLDynamicSizeView prototype. Try running the Dynamic Height sample project.

Categories : IOS

Multiple sequence alignment - appending to an alignment
If your primary issue in the time it takes to re-run alignment (re-computing the PWI matrix should be computationally cheap), then MUSCLE has the capability to do what you're looking for, a procedure commonly termed "profile-profile alignment". Profile-profile alignment When passing the -profile flag, the alignments will be "re-aligned to each other, keeping input columns intact and inserting columns of gaps where needed.": If you have two existing alignments of related sequences you can use the –profile option of MUSCLE to align those two sequences. Typical usage is: muscle -profile -in1 one.afa -in2 two.afa -out both.afa Implementing in Biopython Biopython has a wrapper around MUSCLE, but I find it easier to just use subprocess to call MUSCLE, then parse the results back

Categories : Python

struct alignment without argument and alignment on 16-bit target
If the compiler gets an unqualified __attribute__((aligned)) attribute, it defaults to the largest necessary alignment on the machine. That is not the same as saying 'you cannot set a larger alignment'; your test demonstrates that you can set a larger alignment explicitly. You just won't get a bigger (or smaller) alignment unless you are explicit about it.

Categories : C

CSS Alignment - Correcting Alignment of Floated Elements
Everything is looks good, you need to add display: inline-table; for below CSS. The element will displayed as an inline-level table ul.vt li.vt-line-header { display: inline-table; //----Add this to your CSS } Hope you understand.

Categories : CSS

CSS 3 column layout, sidebars with flexible height, Code order for SEO: CONTENT-LEFT-RIGHT
You can use one of the most popular "ready-to-use" layouts: Holy Grail. It has everything that you asked for.

Categories : HTML

How to avoid the 2nd alignment is affected by the 1st alignment?
I'm not familiar with Tabular and there might be an option to do this, but I would simply change the second s to s+ in order to match any amount of whitespace: Tabularize /^(.{-}zss+){2}/l0 Edit: Here's a more proper solution, combining the steps into one: Tabularize /(^(S*s){,1})@<=S*zss/l0 The first part is a lookbehind that matches up to the 0th or 1st space, any non-whitespace characters are then skipped, and the next space is matched (the 1st and 2nd, respectively). This can be generalized to any range; e.g. to align by the 2nd through 5th spaces, use {1,4}. Edit: If you need to align by a set of spaces that do not constitute a range in that sense, I would utilize logical ORs in the lookbehind. Unfortunately, this becomes much more clumsy and repetitive. For example, to alig

Categories : Regex

Make two columns same height
It looks like your div height is same. Please add a background color to the .man-content class for test purpose. .main-content{ float: left; width: 60%; margin-left: 5%; background-color: #006400; /*new*/ }

Categories : Jquery

How to make expandable div with min-height
I can't understand your question very clearly, I think you should set a correct overflow property to your div, try giving it overflow: auto; or any other suitable one The CSS Overflow Property

Categories : HTML

How to make this content div 100% of available height?
You could do something like this: http://jsfiddle.net/t3Gjx/10/ html, body { background: black; height: 100%; } .page { min-height: 100%; height: 100%; margin: 0 auto -75px; /* the bottom margin is the negative value of the footer's height */ } .menu { background: #ff0000; height: 100px; position: relative; z-index: 555; } .content { background: #00ff00; margin: -100px 0 -75px; min-height: 100%; height: auto !important; height: 100%; } .content:before { content: ""; display: block; height: 100px; width: 100%; } .content:after { content: ""; display: block; height: 75px; width: 100%; } .footer { width: 100%; height: 75px; background: #0000ff; } Explanation: This uses the techniqu

Categories : CSS

Make all divs the height of the very first div
It's hard to say without seeing your DOM, but generally you can just use a multiple elements selector separated by commas. Let's say you want to resize 3 elements: div with class site-intro. div with ID user-data. section element. The code will look like that: function resizeDiv() { vpw = $(window).width(); vph = $(window).height(); $('.site-intro, #user-data, section').height(vph); }

Categories : Javascript

How to make the height of two rows 100%?
This is a tricky one, sense you're dealing with responsive height. However, most of this can be achieved with jQuery. Use .outerHeight() to get the window height, $(window).outerHeight. Once you have the height what you're working with, you can then assign the heights (ratio) to the blocks within it. And if the user resizes the window after the page has loaded, you can detect that with $(window).on('resize', function() { ... }); Does this help or do you need me to work with your example?

Categories : Javascript

calculate and set the height for some div (initial settings). When the height of the browser window is changed --> change the height for div
is that what you are looking for? api.jquery.com jQuery(document).ready(function () { $(window).resize(function() { var height = document.documentElement.clientHeight - 500; if (height < 135) { height = 135; } document.getElementById('left_space').style.height = height + 'px'; jQuery(window).resize(function () { var height = document.documentElement.clientHeight - 500; if (height < 135) { height = 135; } document.getElementById('left_space').style.height = height + 'px'; }); }); });

Categories : Javascript

How to make the height of a div box depend on how much text is in it
You would do this by not setting a height at all which is equivalent to height: auto;. By default the div will wrap the content. If it's not doing that then post a jsfiddle.

Categories : CSS

How do I make a floated img have the same height as its parent?
If the footer is a set height, height: inherit; should do the trick. If the footer's height is dynamic (ie a percentage rather than a set number) you can use jQuery to match its height to the footer's height, like so: $('footer img').height( $('footer').height() + 'px'); This is assuming of course that your img element is contained in a footer element. Hope that helps!

Categories : CSS

How to make a inner div 100% height with sticky footer?
You need to create a 'spacer' div CSS #spacer { height: 100px; // same height as footer } .main { height: 100%; } HTML <body> <div id="wrap"> <div class="main"> <div class="sidebar"></div> <div class="conteudo"></div> </div> </div> <div id="spacer"></div> <div id="footer"></div> </body>

Categories : HTML

Make an element at least the height of the viewport
Try $(document).ready(function () { //make sections at least as tall as the viewport var $sections = $('section').each(function(){ var $this = $(this); $this.data('oheight', $this.height()) }); $(window).resize(function(){ var winheight = $(window).height(); $('section').each(function(){ var $this = $(this), oheight = $this.data('oheight') || $this.height(); $this.css('height', oheight <= winheight ? winheight : oheight); //remove this $this.find('.height').text(oheight <= winheight ? winheight : oheight) }) }).resize() }); Demo: Fiddle

Categories : Javascript

How to make a Div's height change slower
You are looping 300 items and you try to find the element with getELementById and then trying to style the selected item I think that makes the process really slow and laggy.

Categories : Javascript

How to make a CSS div set auto height to content
Remove the position:absolute; and replace it with position:relative; #contentbox{ width:80%; left:10%; position:relative; background-color:white; border-width:5px; border-style:solid; border-color:#0052b0; min-height:700px; top:-50px; }

Categories : CSS

How to make the div contents fit into the parent div with height 100%?
Do you need this: http://jsfiddle.net/pn9Qa/1/ html, body { height: 100%; } .container { height: 100%; width: 100%; border: 3px solid red; } .top { height: 100%; width: 100%; background-color:pink; float:left; } .bottom { width: 100%; height: 100%; background-color: green; float: left; } .one { width: 100%; height: 30px; background-color: orange; } .two { width: 100%; height: 100%; background-color: yellow; overflow: auto; }

Categories : HTML

How to make an anchor fill the height of its containing div
you can calculate the height of the container and insert it in the height of the "a" element: var _selector = ".ui-spinner" var _inputvar = 25; $(_selector).css("height", _inputvar); $(_selector).css("line-height", "1"); console.log($(_selector).height()); $(_selector + " a").css("height", $(_selector).height()); $(_selector + " .ui-spinner-input").css("width", "52px"); $(_selector + " a").css("width", _inputvar); $(_selector + " span").css({display:"inline-block",position:"static",marginTop:(_inputvar/10)+"px"}); http://jsfiddle.net/37za8/13/ Notice I removed the input height, depends on your set fonts you might need to put it back. The margin top value can be optomized according to the expected range of values, I think in this case division by 10 works up to a certain point By

Categories : CSS



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