w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

Changing the vertical alignment of floated elements
The problem is that I notice you are using .column1 and .column2 and you are alternating to use one time for the description and one time for the poster. So it's behaving as it should by adding your "even" poster at the bottom where the description should be. This means that the poster markup ends up lower than it should be, in this case I would suggest a different approach with CSS :nth-child pseudo selectors so your markup remains the same (meaning always use .column1 for the poster) but you can use CSS to style and float depending on the element. Another great resource full of examples on how to use this powerful pseudo selector is found here. Edited: Working jsFiddle Added this fiddle in order to show how to use the nth-child for this specific issue. Please notice how I'm saying,

Categories : CSS

alignment issue inside div
Hey take a took at this example. <html> <head> <title></title> <style type="text/css"> #tablecellexamples div { border:1px solid black; width:130px; background-color:#eee } </style> </head> <body> <div id="tablecellexamples"> <div style="display:table-row"> <div> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin luctus dignissim ipsum a dignissim. Proin mattis orci sit amet quam feugiat lobortis. </div> <div style="display:table-cell; vertical-align:top">Top aligned</div> <div style="display:table-cell; vertical-align:middle">Center aligned</div> <div style="display:table-cell; vertical-align:bottom">Bottom a

Categories : HTML

how in drupal forms can horizontal alignment of elements happen
You can use CSS! In Form API, you can use #attach property to attach online or CSS files that sets floating and display, etc CSS properties that you can use to set the layout of the form. See #title_display property: you can set title display options such as 'after' and 'before'. See https://api.drupal.org/api/drupal/includes%21form.inc/function/theme_form_element/7

Categories : Forms

vertical alignment of ul all the way to the top inside a div - no img, just text
ul does not get its margin from body, you can see it clearly in firebug; it works if you give it its own margin as shown in this fiddle body, ul { color:#000000; background-color:#FFFFFF; margin: 0; padding: 0; } obviously, there are more elegant ways of assigning the correct css, just done that way for demonstration purposes

Categories : HTML

Vertical alignment of text and a div inside another one
Hi SunSky I forked your fiddle and made this one, you can use transformation properties to rotate the text. This should work in webkit browsers, mozilla, opera and IE9. I didn't try it on earlier versions of IE but it should work at least in IE versions 7 and 8. The transform property works with the browsers mentioned except <=IE8 for IE 7,8 I put css property writing-mode:tb-lr; and text-orientation:sideways-lr; to get the desired effect in these older IE browsers. You will have to play with those values to get what you really want. With transformations it's easier since you only have to rotate it to the point you want it, if you want to center it or move it from the edges of the divCenter just use paddings, to center the box you use margin-left:auto; and margin-right:auto; for these

Categories : HTML

How do I set alignment in buttons used inside a GXT grid
Have you tried to set a inline style for the column that contains your TextButtonCell? Something like this: deleteButton.setColumnTextClassName(CommonStyles.get().inlineBlock()); Here is some sample code, based on the Sencha showcase: public class GridTextButtonAlignment implements EntryPoint { private static final String[] COLORS = new String[] {"161616", "002241", "006874", "82a700", "bbc039", "f3f1cd"}; interface PlaceProperties extends PropertyAccess<Plant> { ValueProvider<Plant, Date> available(); @Path("name") ModelKeyProvider<Plant> key(); ValueProvider<Plant, String> name(); ValueProvider<Plant, Integer> difficulty(); ValueProvider<Plant, Double> progress(); ValueProvider<Plant, String> color();

Categories : Java

left and right alignment rows inside Listview?
Just a guess. in main.xml change width of your ListView to match_parent. Also add appropriate weight to the layout containing EditText and button. Now the whole space will be assigned to the listView.

Categories : Android

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

Grid alignment inside ComboBox selection
You need to set the HorizontalContentAlignment of items to Stretch like this: <ComboBox x:Name="ServicesComboBox" Margin="36,220,36,0" VerticalAlignment="Top" BorderBrush="#CC000000" SelectionChanged="ComboBox_SelectionChanged" ItemTemplate="{StaticResource MetricService}"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem"> <Setter Property="HorizontalContentAlignment" Value="Stretch" /> </Style> </ComboBox.ItemContainerStyle> </ComboBox>

Categories : Xaml

Issue with programmatical alignment inside Relative layout in Android
You have to specify how the TextView and ImageView are related in their respective LayoutParams. You can use the addRule method to do the same. For egs: item.setId(A_POSITIVE_INTEGER); myparam.addRule(RelativeLayout.BELOW, item.getId()); tv.setLayoutParams(myparam); will make the TextView appear below the ImageView.

Categories : Android

Two JQuerys (Image Slider and Caption) only caption first image of list?
<link rel="stylesheet" href="flexslider.css" type="text/css"> <link type="text/css" rel="stylesheet" href="css/jquery.capty.css"/> Probably these two CSS files are conflicting with eachother they have some id or class in common so they are manipulating one way or the other way. Try to implement it without one of those slider js and css files.

Categories : Jquery

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

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

Sapi how to get elements inside tag elements
You're using a W3C grammar, not a SAPI grammar. Silly me. That data is stored in the SPPHRASE structure, not the text, so you would retrieve it like this: ISpRecoResult* pResult = spevent.RecoResult(); SPPHRASE* pphrase; hr = pResult->GetPhrase(&pphrase); // your code here CoTaskMemFree(pphrase); Now, I haven't used W3C grammars with C++, so I'm not entirely sure if it works the same way as it does with SAPI grammars, but assuming it does, the tag data is stored as a tree in pphrase->pProperties.

Categories : C++

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

Search for anything inside certain elements
Try this: <div[^>]*>.*?</div> or if you just want divs with class="ex" like above <div class="ex">.*?</div> Edit: if you want to have more attributes in your div besides class, but want to make sure it's a specific class, you could do it this way: <div[^>]*?class="ex"[^>]*>.*?</div> This would match all of the below: <div class="ex">blah blah</div> <div class="ex" id="blah">blah blah</div> <div id="foo" class="ex">blah blah</div> <div id="foo" class="ex" style="bar">blah blah</div> I just re-read your question and it appears you are trying to replace only what is inside the element and not the entire element. If you wish to do that, you can do it like this: Find what: (<div[^>]*?

Categories : HTML

How to compress elements inside a div
First, you need max-width instead of min-width for the links. Or, if you always want to space them evenly across the parent, just width. This width needs to be calculated by you, because the browser can't do that by itself. In our example, there are 3 links, so the width of each link needs to be 100/3 = 33.3%. Then some more styles, like text-overflow, to take care of the ellipsing, and you end up with this: #navigation a{ width: 33.3%; float:left; padding:11px; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; display:inline-block; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } jsFiddle As you can see, I also had to float them, to get rid of the spaces in between. If you don't want any

Categories : HTML

Space elements inside div
try following <div id="container"> <div class="abc" > image.. </div> <div class="abc" > image.. </div> <div class="abc" > image.. </div> </div> then in css #container{ overflow:hidden; width:auto; display:inline; } .abc{ float:right; margin-left:10px; } You can check the working demo here http://jsfiddle.net/QjL2D/

Categories : CSS

Center Elements Inside of a Div
Whenever I face any floated container to center horizontally I use the followings. Try wrapping your markup (which needs to be centered; the div in your case) with these: <div class="center_outer"> <div class="center_inner"> <!-- Put your contents here (which needs to be centered) --> </div> </div> CSS: .center_outer { position: relative; left: 50%; float: left; } .center_inner { position: relative; left: -50%; } Check: http://jsfiddle.net/jduDD/1/ (I have removed the width style)

Categories : CSS

css+js: div click (and elements inside it)
Like this: HTML <div id="overlaySplash" onclick="clickHandler(event);"> <div id="insideBox" onclick="clickHandlerInner(event);">Inner</div> </div> JS function clickHandler(event) { alert("no"); } function clickHandlerInner(event) { if (!event) var event = window.event; event.cancelBubble = true; //IE if (event.stopPropagation) event.stopPropagation() alert("yes") } jsFiddle

Categories : Javascript

DIV Wrap two different elements inside a DIV by JS
You can use wrapAll() <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript"> jQuery(function() { $('img, .small-message', '#container').wrapAll('<div id="wrap-inside" />'); }); </script> FIDDLE

Categories : Jquery

Are elements ID inside an hidden div avaiable?
its against the rules of HTML to have two elements with the same id on the same page. you can use a class. and even if a div is display:none it will still be present in the DOM tree.

Categories : Javascript

Float elements inside a
Looks like you're floating the nav and the h1 to the left. your elements are inside the NAV. try nav { float:right display:inline-block width:75% position:relative } nav ul li { display:inline; }

Categories : HTML

Grow floated elements to fit inside
It looks like this is the start of tabular data. I'd use a <table>. If I'm mistaking, you can fake a table with CSS. ul { display: table; list-style: none; margin: 0; padding: 0; width: 100%; } li { display: table-cell; padding: 0 3%; } Here's a quick little demo: http://jsbin.com/iwacum/1/edit

Categories : HTML

Dynamic Div ID and Creating Elements Inside it
This does not do what I think you think it does: var theDiv = $("#projectsList"+divID).attr('id'); //document.getElementById('projectsList'); You should do var theDiv = $("#projectsList"+divID)[0]; to get the DOM element. Or, for this scenario, just do var theDiv = document.getElementById("projectsList" + divID); Also, I'm not sure why you are mixing raw DOM operations and jQuery wrapped operations everywhere. Just stick to one of them, and be consistent.

Categories : Javascript

XML read text inside two elements
You can use LINQ to XML: var xdoc = XDocument.Load(path_to_xml); var items = from i in xdoc.Root.Elements("item") select new { Url = (string)i.Element("url"), Name = (string)i.Element("name") }; This will give list of anonymous objects corresponding to your item elements. Each object will have strongly-typed properties for url and name: foreach(var item in items) { // use item.Url or item.Name }

Categories : C#

Grab all fieldset elements inside div
You can try this: $(function(){ $('[name="TransactionType"]').change(function(){ var id = '#' + this.className; //Get the id from the clicked radio classname $('#RightDiv').find('fieldset').hide();// hide all fieldsets; $('#RightDiv').find(id).show(); // show the selected one. }); }); Just note that in your html helper you are providing the the first overload as same name for all. All is well except i believe it will create duplicate ids for each of these. You may want to override it in the HTMLattributes. @Html.RadioButton("TransactionType", false, new{@class="Enroll", id="Radio1"}) @Html.RadioButton("TransactionType", false, new{@class="New", id="Radio2"})

Categories : Asp Net Mvc

Using div as a viewport for floated elements inside of it
HTML <span class="switcher"> <input type="checkbox" id="chk1"> <label for="chk1"> <span class="on">ON</span> <span class="btn">| | |</span> <span class="off">OF</span> </label> </span> CSS .switcher{ width: 100px; overflow: hidden; display: block; border: 1px #000 solid; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .switcher input[type="checkbox"]{ -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; position: absolute; top: 0;

Categories : CSS

styling elements inside ui:repeat by css
I've found it , I just added styleclass attribute in the a4j:commandlink like this: < a4j:commandLink id="thumbLink" styleClass="thumbnail" /> Hope that will help someone.

Categories : JSF

Store elements inside an array then use it later in jquery
Well to use the saved jQuery object you'd just use normal array indexing: els[0].css("backgroundColor", "purple"); Now, you say that you want to save that jQuery object to preserve its state. That won't work; the jQuery object is just a wrapper that provides access to the DOM element(s) chosen by your selector. It does not copy or preserve the state of the DOM, however. If the DOM changes, then those changes will be reflected by that jQuery object and old property values won't be available. If you want to preserve the state of the element, you have to do it explicitly. For example, if "something" is an <input>, you could save its value: var savedValue = $('#something').val(); If you want to save the properties to an array: var els = []; els.push({ height: $('#something').h

Categories : Javascript

How to access elements inside rows and columns
Your approach is correct but your algorithm is wrong. Suppose that the grid contains two elements. The first one is the one you're searching for. The foreach enumerates all the controls, and returns the first one. It's the right row and column, so you assign it to fr. The foreach goes on and returns the second one. It's not the right row/column, so you assign null to fr. The foreach loop has finished enumerating the elements, and returns fr, which is null. Basically, your code will only work if the element is the last child of the grid. To fix your algorithm, use the break instruction to exit the loop when you find the control: FrameworkElement fr = null; foreach (FrameworkElement child in grid.Children) { if ((Grid.GetRow(child) == row) && (Grid.GetColumn(child) == col

Categories : C#

Animating Elements Inside Bootstrap Carousel
It's too old but in case if anyone still looking for the answer here it is: HTML <div class="container main-container"> <h1>Bootstrap Carousel with Animate.css</h1> <div id="carousel-example-generic" class="carousel slide"> <!-- Indicators --> <ol class="carousel-indicators"> <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li> <li data-target="#carousel-example-generic" data-slide-to="1"></li> <li data-target="#carousel-example-generic" data-slide-to="2"></li> </ol> <!-- Wrapper for slides --> <div class="carousel-inner" rol

Categories : CSS

Access elements of a list inside a function
Try lapply( data , function(x) { tmp <- summary(x)$fstatistic ; pf( tmp[1] , tmp[2] , tmp[3] , lower.tail = F ) } ) For example... # non-sensical lm! set.seed(123) y <- 1 + rnorm(10) # this makes a list of 5 lm's using the response data 'y' data <- replicate( 5 , lm( y ~ 1 + rnorm(10) ) , simpl = FALSE ) # Call 'summary' on model object to calculate the f-statistic, and run 'pf' to get p-value sapply( data , function(x) { f <- summary(x)$fstatistic ; pf(f[1], f[2], f[3], lower.tail=F) } ) value value value value value 0.53263166 0.03896285 0.70298727 0.57721440 0.45352619

Categories : R

How to have a class automatically applied to all new LI elements inside a UL?
Adding the class You can add the class to the newly created element with .addClass() $("ul#list").append($('<li>added after</li>').addClass("original")); Or just write it manually when you create the element: $("ul#list").append('<li class="original">added after</li>'); jsFiddleDemo Alternative: Making the CSS Selector more general You can also use the original class as the default class for all list items inside the ul. li { color: red; cursor: pointer; } li.selected { color:green; } jsFiddleDemo

Categories : Jquery

jQuery wrap and re-order elements inside
This should work: $('a.top_link+div.sub').each(function () { $(this).insertBefore($(this).prev()).add($(this).next()).wrapAll('<li class="aaa">'); }); For each div.sub, the above code does: Move it to before the <a> Add the <a> to the collection Wrap both in an <li> Demo: http://jsfiddle.net/vjC3x/

Categories : Jquery

Select2 cannot choose elements inside input
Refer http://ivaynberg.github.io/select2/#documentation formatSelection: formatSelectionMethod, function formatSelectionMethod(row) { return row.text;} I hope you will find it helpful.

Categories : Jquery

Correct way to clear floating elements inside
  • Floats are not contained by default. If the images are taller than the <li>, they will push the content of the following <li> to the right (float left of). Some alternatives to clearfix can be to force a new block formatting context. The LIs will stretch to their content, so a popular method is: li { overflow: hidden; } Compare http://jsfiddle.net/NvHVa/ vs http://jsfiddle.net/NvHVa/1/ Other ways to trigger a block formatting context: https://developer.mozilla.org/en-US/docs/Web/CSS/Block_formatting_context For an explanation and a better method, check out http://colinaarts.com/articles/float-containment/

    Categories : HTML

    How to show the div elements inside the javascript function?
    your code is not doing anything to show div see http://jqueryui.com/dialog/ documentation to show div you can use replace your variable to win instead of window $('body').append(win);

    Categories : Javascript

    How to remove all elements inside