FAQ Database Discussion Community


Alignment changes on entering text within a div with display inline-block

html,css,alignment
Stuck on a problem where when I enter text in a div with display property set to inline-block. Here's the HTML: <div class="row" id="section"> <div class="sectionheading"> </div> <div class="sectionheading"> </div> <div class="sectionheading"> </div> <div class="sectionheading" id="sectionheading"> <span>Text</span> </div> </div> CSS: .sectionheading { display: inline-block; width: 6px; background-color: #df5e5e; height:35px; }...

align left and right two JLabels in a “North” BorderLayout

java,alignment,jlabel
I am using BorderLayout for my application. setLayout(new BorderLayout()); I need to align two JLabels in left and right in the "NORTH" of the JPanel. Here is my code: JPanel top = new JPanel(); top.add(topTxtLabel); top.add(logoutTxtLabel); add(BorderLayout.PAGE_START, top); So I need topTxtLabel in left and logoutTxtLabel in right. I tried...

Which implementations of the C programming language violate the following assumptions?

c,alignment,padding,abi
I'm trying to write a portable function that marshals binary formats into structures according to a formatting string not entirely unlike scanf. To do this, I make a couple of assumptions about the platform my code is running on: This structalign macro portably finds the alignment of a scalar type....

UITableView - Row - Multiple alignments

ios,swift,uitableview,alignment
I am trying to make a row's contents (in a UITableView) have multiple alignments: left, center and right. I searched Stackoverflow for a solution and found this: Different text alignment to a row in table view. The only problem is that the solution is ObjectiveC-based, which I am having trouble...

Linking a center aligned image on a landing page to another page

css3,alignment,anchor,center
I'm trying to center a single clickable image on my landing page that links to another page in a password protected directory (folder2). I am able to center align the image, but I'm not able to figure out how to link the image to the page in the password protected...

How do I vertically centre a div of variable height within a div of variable height?

html,css,alignment,height
I'm a bit of an amateur when it comes to CSS/HTML web stuff but I feel I am learning a lot and am grateful of all the help offered in all the stack overflow questions. I have run into a problem and been searching for a solution for hours already,...

Aligning form fields using CSS

css,forms,drupal,alignment,inline
I have an advanced search form (click "Advanced search") here in Dupal 7 - http://www.ibuild.ph/mtf-rdp-minimal/search/node and contact form here - http://www.ibuild.ph/mtf-rdp-minimal/contact. The search fields are inline, while the contact fields are positioned below the labels. Is there a way to inline position the fields with the text labels and make...

Alignment Issue with Wordpress [closed]

html,wordpress,alignment
Help, I'm a beginner on code! Can someone tell me the code to get the form to go beside the picture instead of under it? Right now the picture is cropped even though I said to show the full thing. http://mycolorshop.com/wedding-questionnaire Thank you so much!...

C++ reading binary data to struct

c++,binary,alignment
I am currently reading a binary file that i know the structure of and i am trying to place into a struct but when i come to read off the binary file i am finding that when it prints out the struc individually it seems to come out right but...

Another vertical align issue

html,css,alignment
JSFIDDLE: https://jsfiddle.net/o6ekutaL/ HTML <div id="main-body-wrap"> <div id="main-body"> <div id="home-featured-classes-wrap"> <div class="home-featured-class-A"> <div class="home-featured-class-4"> TEXT <h6 class="products">TEXT </div> <div class="home-featured-class-3">THIS DIV NEEDS TO BE IN THE MIDDLE OF THIS PINK DIV, NOT AT THE TOP</div> <div class="clear"></div> </div> </div> <div class="clear"></div> </div></div> CSS /* MAIN...

Text justification C language

c,text,alignment
I have to solve a problem that involves left justification string length and leading zeros. I have the following table : BEGIN CLOSE CONCATENATE DELETE END INITIALIZE PRINT WRITE This is produced by a simple program. My problem is to find out how to convert it like that : It...

Nav menu will not center

css,menu,alignment,center
My nav menu will not center. And I can't find the fault in the code. Maybe someone can help me?! #nav-header { height: 60px; width: auto; background-color: rgba(255, 255, 255, 0.7); margin-top: 80px; } #nav-header li.nav-link { display: inline; padding: 20px 20px 20px 20px; font-family: 'Source Sans Pro', sans-serif,"Open Sans",...

Navigation bar titleView alignment

ios,iphone,swift,alignment,uinavigationitem
I want my navigation bar to show two things in the middle. One them is going to be List name, and the other one will be name of users. User names will be placed under list name. What i have done so far is, i created two label and one...

How to get ListView underneath buttons

android,textview,alignment,android-linearlayout
Right now my listview is to the right of my last button, but I want it to be underneath all three of my buttons (which are all on the same row). How can I get my listview underneath my buttons? Here is my code <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center_horizontal|bottom"...

How can I left align the text in an Angular Material stretched md-button?

button,alignment,angular-material
Without tinkering too much with my own CSS, Is there an attribute or configuration I can use to left align the text in a md-button that is stretched a bit to fit a menu for example? This is my current view <md-sidenav md-is-locked-open="$mdMedia('gt-md')" layout="column"> <md-toolbar> <h1 class="md-toolbar-tools"> <a ng-href="/" layout="row"...

WPF: 2 different label sizes in particular order alignment

wpf,alignment,label
Please take a look at this picture: I try to create same label with 2 sizes: <Grid> <Label Content="11" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="50" /> <Label Content="%" HorizontalAlignment="Right" FontSize="20" VerticalAlignment="Top"/> </Grid> But currently this is not like the picture: ...

Invisible geometry in DX11

xna,alignment,directx,directx-11,xna-math-library
After struggling for many hours to understand and compensate for Microsoft's deprecation of D3DX in Windows 8, I've run into a problem that I can't shake off. The first time I started my program, it became immortal because of an access violation. After having restarted my computer and recompiling and...

How can I align icons with their titles?

html,css,position,alignment
As you can see from this screenshot, My icons aren't aligned with their titles. They are written as two unordered lists. The only solution I have right now is to give individual margin-left to each of the icons, but I'm hoping there is a better way to do it. Any...

How to vertically align text and 4 images?

html,css,wordpress,image,alignment
I am trying to build a page that has a paragraph of text with 4 images in a quad that are directly to the right of it. The problem is I've previously tried using floats, but as expected, this did not work and so far I have this... http://www.franhaines.co.uk/paddlethewye/ The...

Does UL have default margin or padding

html,css,alignment,html-lists
This might seem like a dump question, but I've added an UL to a basic page and the list seems to be off-centered. There's nothing special about the list. No specific css added: just a list. When I load live it's slightly off center. Is there a default margin or...

Why I can't align two buttons

html,css,alignment
I have problem, I can't align two buttons in one line. I tried to set padding of span class pptext2 but without success. Here is code http://jsfiddle.net/71782p4L/1/ HTML <div class="ppdiv"> <button class="ppenvelope"><img src="http://i.imgur.com/RfLMyak.jpg" alt="Slika"></button><button class="pptext"><span class="pptext2">PRIVATE MESSAGE</span></button> </div><!--Zatvoren ppdiv--> CSS .ppdiv{ padding-top:22px; padding-left: 19px; } .ppdiv img{ padding:10px; font-size: 20px;...

Aligning a Centered Div with a Div to its Immediate Right

html,css,alignment
I am looking to align two divs such that div a is in the absolute center of the page and div b is to the immediate right of div b. div a is 320 px wide and div b is 42 px wide. It is important that div a is...

How to set buttons on the same line for linear layout [duplicate]

android,button,alignment,android-linearlayout
This question already has an answer here: Right Align button in horizontal LinearLayout 9 answers I am trying to align my buttons so they are all aligned with each other side by side, but for some reason the next button shows up on the linear below. I must use...

How to Align a Link HTML/CSS

html,css,alignment
I have tried to do the following, as well as using the align only with the a href and img tags, yet I still cannot align the clickable image to the center of the page. <a href="next.html" align="middle"> <img src="tlbr.png" align="middle"> </a> The float tag also does not work in...

How to align JPanel to bottom of JFrame (java swing)

java,swing,jpanel,alignment,layout-manager
Long story short, I'm making a simple audio player in Java and am starting the GUI; no events, no functionality of any kind as of yet. I'm asking how I can the JPanel with the buttons (controls), to align to the bottom center of the main window (JFrame). Here's the...

Issue with Llinear layout hierarchy and alignment

java,android,alignment,android-linearlayout,center
I've some line of code in parent XML as below: <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <include android:id="@+id/header_parent_layout" layout="@layout/common_header_layout" /> <include android:id="@+id/title_header_layout" layout="@layout/title_header_layout" /> <LinearLayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" />...

How can I align text in a button

android,button,alignment
I want align the text in my button on the left, but not at all. for clarifying, look at the red circle in the image. Thanks. (the first in the image is my result, the secondo what i'll want) xml code : <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/activity_libretto" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:orientation="vertical" >...

FX - Suggestions for aligning CheckBox in Grid

java,checkbox,javafx,grid,alignment
Converting from Swing to FX here. We have some CheckBoxes where the Label appears on the left side of the CheckBox. We are accomplishing this by calling setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); The problem is that in some GridPanes, we'll have a Label in column 0 with a Node in column 1 on row...

How do I round to the next 32-bit alignment?

c++,alignment
Packets coming over a network have padding bytes added at the end for alignment. I want to skip these bytes but the packet size is variable but known. Given a number n, how do I round it up to the next 4-byte alignment?

translateY(-50%) blurring child elements

html,css3,alignment,css-transforms
For some reason my vertical alignment code is blurring some but not all child elements in Chrome and Safari. Whats causing it is the translateY(-50%), if I remove this then blurriness is gone however the vertical centring effect is lost. /* @group Center all the things */ .center-wrapper { position:...

HTML button running out of alignment

php,html,css,alignment
My idea is very simple, I will have a search box and a submit button. When user key in the keyword and click on the submit button, results will be shown below with an additional button. Now my problem is I have no idea on how to make the button...

align text and icon CSS

html,css,alignment
I'm trying to do a list with icons. I want to align my text. Here is a jsfiddle to show my question: <ul> <li><i class="fa fa-phone"></i>lorem ipsum test<br>TEST<br></li> <li><i class="fa fa-phone"></i>00 00 00 00 00</li> </ul> TEST is under the icon but I want to put it under the text....

Divs not aligning properly on website (work fine in CodePen though)

html,css,alignment,row
My site consists of green boxes (divs) that are aligned side-by-side in rows. There are 3 divs per row, and their heights are suppose to be the same. Everything works perfectly except for some reason there are 3 divs not aligning properly at the bottom of the page. The problem...

make gtk widget fill parent window

xml,gtk,alignment,pygtk
I am new to gtk programming (but experienced with python). I have a window that has a button widget child. What do I have to do if I want the button to completely fill the window? By the way, this would be extremely easy to do with xml (fill-parent), is...

Vertical align center in div

html,alignment,center
I have this code and i cannot vertical align content in second div to center. <div style="min-height: 317px"> <!-- this min div is auto generated--> <div class="verticalalign"> <h1>Heading</h1> <p>Some text</p> </div> </div> How CSS for class .verticalalign i must write to vertical align center for second div ? Parental div...

How do I make HTML Elements appear on one line?

html,css,alignment
I want to have the H3 and P tags on the same line in pairs. I do not want to use the tag <table>. HTML: <h2>SERVERS:</h2> <!--I want each set of H3 and P to be on the same line--> <h3>Server 1 Status:</h3><p id="running">Running</p> <h3>Server 2 Status:</h3><p id="notRunning">Not Running</p> <h3>Server...

How to “left-center” align wrapped inline-blocks within a div

html,css,responsive-design,alignment
I've seen some similar questions to this, but most seem to lack images that thoroughly display what the problem is. I'm trying to get the following responsive layout to work when narrow. It looks like this right now: Here's what I want it to look like. Note that the left...

Align login form table to top-middle of the screen

javascript,html,forms,login,alignment
I have button value Show Login Page with onclick funtion to popup login screen. I did the click function correctly but I want that form to show at the top middle of the screen. I tried but it's aligning at the left middle only. <html> <head> <title></title> </head> <body> <link...

How to align a child DIV to center (not middle)?

html,css3,alignment
i spend a day searching for a way to align my child DIV from its parent but all my research show same results. This is my first time creating a webpage. !http://i.imgur.com/xpUsMzU.png <== result https://jsfiddle.net/backspaced/6uy56hw4/ <== Code ._header0 { position: relative ; white-space: nowrap ; overflow: hidden ; text-align: center...

Aligning buttons+images+text in a row (android)

android,image,button,alignment
I'm trying to align 3 buttons in a row in the center of the screen. Each button will have a background color, an image, and some text under the image. I've tried using LinearLayout but I can't put the image over the button. I've tried RelativeLayout, and I managed to...

Making 3 columns of text aligned at the same height or line all the time even while re sizing window

html,css,text,alignment,height
CSS: I want to make 3 columns of text aligned at the same height or line all the time even when I resize the window. To illustrate what I am talking about please take a look at the images by following this link: https://drive.google.com/file/d/0BywbaHflqMTERFVrNF84YlBUbTg/view?usp=sharing The problem is that the third...

How to align the form to the center properly?

html,css,alignment
I can set the form width manually but every changes in the <input> width will lead to the troubles, specifically I'll be should adjust form width again. I need scalable alignment i.e. changes in input width shouldn't impact on the form's alignment. form { width: 400px; margin: 0 auto; }...

create output in specific format in c++

c++,alignment
I am not familiar with c++. But I want to make a output as below format. It is great if someone can give me a code in here. Bill Robinson Gross Amount: ............ $3575.00 Federal Tax: ............. $ 536.25 State Tax: ............... $ 125.13 This is my current source code...

Center DIV Horizontally and Vertically

html,css,alignment,centering
I have this HTML structure: <div class="metaboxdet"> <div class="metd"> <h1>Hello World!</h1> </div> </div> http://jsfiddle.net/fvueL00n/2/ the problem here is I cant center the div "metd" horizontally and vertically. I have tried adjusting the top, bottom, left and right but it return a not so accurate results. Is there a way where...

aligning right but not breaking the vertical align

html,css,alignment
I'm still having a lot of trouble with this that it's even difficult to describe the problem now. The yellow text area should be right at the edge (righthand side edge) of the pink div and there should be 30px of margin in between this yellow area div and the...

Align TextViews to top of LinearLayout

android,android-layout,alignment,android-linearlayout,android-textview
I'm creating an app that has four different TextView inside a LinearLayout. The LinearLayout has a weight sum of 4 and every TextView has a weight of 1 (to make them with evenly width). My first problem is that two of the TextViews has a bigger height than the other...

Adjust TextBlock on a Button within a Grid

wpf,xaml,button,alignment,textblock
I have two buttons on a grid. On the right button there should be some text shown left aligned and another text right aligned. In all my tries so far the two strings are positioned in the center of the button and not left and right. Once this is solved...

Move first div below second div via CSS only

html,css,alignment
I have 2 divs inside a container like this: <div id="container"> <div id="first">Hello World</div> <div id="second">I want to be at the top</div> </div> I want to align the first div below the second div without changing the HTML. How is this possible? Here is my CSS: #container { float:left; width:100%;...

Add a twitter share button to shiny R navbar

css,r,alignment,shiny,navbar
Trying to add a twitter share button to my navbar. The closet I can get is to place it in the header, but this leaves too much white space. I would like it to go in the top right of the navbar, but I cannot figure out which (if any)...

Content editable inline div moves when empty

html,css,html5,alignment,inline
Here is an example: http://jsfiddle.net/nojv18wf/ <div> <div class="display">Blah blah blah?</div> <div class="input" contenteditable="true"></div> </div> <br /><br /><br /><br /> <div> <div class="display">Blah blah blah?</div> <div class="input border" contenteditable="true"></div> </div> Watch where the caret goes when you click on "blah blah blah." In the first example, it jumps to before the...

set padding to dynamic textbox C# asp.net

c#,asp.net,textbox,alignment
here is the code I create textbox from C# code.. for (int x = 0; x < 30; x++) { TextBox txt = new TextBox(); txt.ID = "txt - " + x.ToString(); data.Controls.Add(txt); data.Controls.Add(new LiteralControl("<br/>")); } all textbox will be stick to each other.. I wonder can I add padding-top...

Centering text inside of an element [closed]

php,jquery,html,css,alignment
I'm trying to align text on this page : https://m.omegarealm.tk/ (Mobile sub domain specifically) To the center of the red bar on the top of the screen vertically. The result I'm looking for is the word "test" to be aligned in the center of the nav bar (red bar) vertically....

I can't vertical align a logo on Wordpress [closed]

html,wordpress,alignment,graphical-logo
I spend the last two days trying to vertical align a logo in a website done with wordpress. Here's the link: www.contidosdixitais.com Does anybody knows what am I doing wrong? Tried with vertical-align: middle; margin-bottom: 0; and more but nothing works....

Align Buttons Side by Side Bootstrap

html,css,twitter-bootstrap,alignment
I am trying to align my two bootstrap buttons side by side (horizontally), right now they are aligned one on top of another (vertically). I have found a few questions on here, but still can't seem to get it right... I will post my code below: <div class="row"> <div class="col-sm-12">...

HTML textarea alignment

php,html,css,alignment,word
Suppose I have textarea filled with following text employee/company/salary john/microsoft/12.000 michael/citrusdata/15.000 How can I align each column vertically so I get following text: employee__________company__________salary john______________microsoft__________12.000 michael___________citrusdata__________15.000 In this example I used underscores to specify whitespaces, thought to write a simple function like nl2br() to replace '/' with one or many...

How to center align/center parallax scrolling content?

html,css,position,alignment,parallax
I am using a simple parallax scrolling effect however I am running into two problems. I cannot have the #background stay centered while zooming in and out. If i change the position to relative it will, but it needs to remain fixed to create the parallax effect. the #nav container...

Cannot align divs with % widths or heights properly?

javascript,html,css,alignment
I am having problems aligning elements on my page properly. I have a live example here..http://newbapps.com/8ball/ The div 'answer' should be overlayed over the triangle in the img 'ball'. The problem is, I want this too look properly centered even with different window sizes. If I was using pixel width/height...

Center text for receipt printing

c#,winforms,printing,alignment
I have some code which I'm using to print a receipt from C#. The code below prints OK but I'm struggling with aligning the text left right and center, Graphics graphics = e.Graphics; Font font = new Font("Courier New", 10); float fontHeight = font.GetHeight(); int startX = 0; int startY...

How do I align 2 divs (each has its own padding) next to each other?

html,css,alignment,css-float
With the padding commented out as shown, the website works like I'd expect (2 div columns next to each other. However, when I add padding, the #right div shifts downwards. How would I make it work as intended with padding? HTML: Two divs contained directly in body CSS: #left {...

Need to align a button under an image with a text at their right

css,alignment,css-position
¡Hello! I've looking for some questions like this, but i only found this one, and its solution is useless for me. I have a website where some books are shown, it is edicionesparalelo.com, and another one where people can buy those books: tienda.edicionesparalelo.com I'd want to put a button under...

Aligning images in HTML tables

html,css,image,alignment,html-table
I have a 1x2 HTML table that will be the heading of an email. The first column contains a linked image, the second a heading. <table> <tr> <td width="50%" style="text-align:left; padding-left:10%;"> <a target="_blank" href="http://www.google.com/"> <img src="img/logo.jpg" alt="Logo" style="width:30%; height:30%;" /> </a> </td> <td width="50%" style="text-align:right; padding-right:10%;"> <h2>Order Confirmation</h2> </td> </tr>...

How to Center Cards within Div While Maintaining a Left-Align

html,css,alignment
I am currently building an app making use of cards. I would like the cards to be centered horizontally within the container, however the last row should be aligned left. Websites such as Yummly (http://www.yummly.com/) achieve this when you resize the page. This is what I have so far, except...

centering website using header tag

html,css,alignment
I want to know if it is possible to center a website header which has not been placed into divisions, but has been placed in the header tag. It's code goes something like this: <header> <div class="top"> </div> <div class="image"> </div> </header> The CSS goes something like this: header {...

Align an image center, bottom of a responsive div

html,css,alignment,center
<div id="banner" class="cf"> <div class="banner container"> <hr/> <p class="banner-text"> Some text here <span class="sub-bt">That's it.</span> </p> <a href="#" rel="nofollow" class="learn-btn">Learn More</a> <img src="<?php echo get_template_directory_uri(); ?>/library/images/responsive_ex.png" class="res-ex"> </div> </div> This is the code for the issue as far. I need to position the image with a class of "res-ex" to...

Using + :after to make a better css ruby layout but alignment doesn't work

css,alignment
I've tried to reuse the ruby layout from the learnJapanese reddit (example) which works with <a href='#reading' title='hiragana'>japanese kanji</a> and then does display the hiragana before the title via css for #reading :before. In my case I want to display the reading below the word (using css :after) but I...

horizontally aligning multiple divs (CSS)

html,css,html5,css3,alignment
I need to align these divs so that the space between "content1" and the red div equals the space between "content4" and the red div. I don't mind changing the blue-div's margin but this should work for any width. I used to achieve this by making the width of the...

CSS vertical align based on height of other element

html,css,alignment,vertical-alignment
I'm trying to create a block with an image that contains content by your side, where I intend to align the image vertically based on the content's height. I've tried alignments with table/table-cell technique but I can't get what I want.. click here to see what I want: ...

Moving form elements into a position where they look stacked

html,css,forms,alignment
I have a login form I'm creating... The problem is, I can't align the text boxes and text correctly. It looks like this at the moment: But i need it to look like: This is very hard to explain. What I really want is for the text and text boxes...

How can I centre each text element within each
both vertically and horizontally, so that the text is exactly in the middle

html,css,alignment,positioning
I am trying to create nine circles, with a picture of a person in each, with the name of the indidvidual directly in the middle of each picture. Below is my HTML and CSS file. I have tried using text-align: centre however it does not look accurate? Also, it only...

How can I make the main form align correctly after my control height is autosized and then I maximize the form?

delphi,alignment,delphi-2009
This one I really don't know how to solve it... How to reproduce the problem: Run the code and and and shrink the window until the height of DriveBar is increased and then maximize the window. Then you can notice that Panel1 is no more top aligned, and between these...

JavaFX: Different types of alignment in one column of TableView

javafx,alignment,tableview,cell
Is it possible to do different types of alignment for each cell in one column of TableView? E.g. I have a column with 3 possible types of data inside: positive number, negative number and "-". First should be aligned left, second - right and 3rd - center. This is what...

Bootstrap container leans a little left when it should be centered

html,css,twitter-bootstrap,twitter-bootstrap-3,alignment
I am having trouble aligning the content of the website because it always wants to go a little to the left. This predicament stands out the best in the mobile view. http://becyclefit.com As you can see the content (container) is a little left from the center. I have no idea...

Center align div to the bottom of scrollable div

html,css,alignment
<div class="chat-space"> <ol id="chat" class="discussion"> <!-- Chat messages get added here --> </ol> <div id="chat-box"> <input id="message"></input> <button onclick="sendMessage()">Send</button> </div> </div> How can I have the chat-box div to the bottom of the chat-space div at all times and centred as well, the chat-space div becomes scrollable as chat messages...

Swift UITableViewCell Alignment

uitableview,swift,alignment,custom-controls,subtitle
I am trying to display a page like the following page title (left align) region name(center align) people in the region(subtitle with email in the detail label) But if I choose subtitle as cell style, everything will be left aligned and I cannot change them in the code. Then If...

vertically centering video inside a video tag

html5,video,alignment,center
how do you center vertically a video inside a video tag? currently the video is flush top and the bottom is getting cut off. what i would like to do is for the middle of the video to be in the middle of the video container. the video's height will...

How to create toolbar with left, center and right sections in javaFX?

java,javafx,alignment,toolbar
I'm trying to create a customized toolbar in javafx. This toolbar should be able to display controls in the center, in the left side and in the right side (three sections) of its surface. The problem is that I have no idea to achive this. I read many hints related...

When I try to get the consensus sequences with biopython I get an AttributeError

python,alignment,biopython,consensus
Looks like I got a bug when I try: >>> from Bio.Align import AlignInfo >>> summary_align = AlignInfo.SummaryInfo('/home/ivan/Elasmo only') >>> consensus = summary_align.dumb_consensus() Traceback (most recent call last): File "<pyshell#148>", line 1, in <module> consensus = summary_align.dumb_consensus() File "/usr/local/lib/python2.7/dist-packages/Bio/Align/AlignInfo.py", line 76, in dumb_consensus con_len = self.alignment.get_alignment_length() AttributeError: 'str' object has...

WPF itemscontrol child alignment

wpf,mvvm,alignment,itemscontrol
I have a WPF MVVM application with an itemscontrol. The number of horizontal child items is influenced by the itemscontrol width. There is only 1 thing i haven't solved. I'm trying to align the child elements in a way that there are always centered. I have made quick pictures in...

How to center CSS-shapes within a wrapper in a row

html,alignment,center,css-shapes
how do I center shapes that are within a wrapper in a row. So far Iv got them into the row but I cant get them to center horizontally. Here is the html code that deals with that part: .wrapper { overflow: hidden; /*make sure the wrapper has no dimension*/...

Vertically aligned image

html,css,twitter-bootstrap,alignment
I have this big logo on the home page which should be aligned to center. I managed to center it horizontally, but not vertically. The only solution I could think of was setting the top-margin to 20% but it seems that this is not a good solution for a responsive...

How do I get the divs to float next to, and below each other

html,css,alignment,css-float,positioning
I have a lot of divs with text in it, and I want them to nicely align next to each other and below each other. (I've read somehwere that I should make a parent div for these, and give the parent a relative position and the child a absolute position,...

How to align two Gtk3 Entry fields

python-3.x,alignment,gtk3
I've got a GUI that uses a GtkEntry widget to get some users input. Here's what it looks like: \ I've got it working like I want, other than the fact that the To: and CC: fields aren't aligned and that's really annoying. Is there any way I can align...

malloc using 4 bytes for char

memory,alignment,malloc
I am writing a code to examine how memory is managed between stack and heap. for a course work. #include<stdio.h> #include<stdlib.h> #define NUM_OF_CHARS 100 // function prototype void f(void); int main() { f(); return 0; } void f(void) { char *ptr1; ptr1 = (char *) malloc(NUM_OF_CHARS * sizeof(int)); printf("Address array...

Icon left of multi-line heading

html,css,alignment
I'm trying to display an icon (font awesome) to the left of a heading, which currently works when the heading is on a single line, but the alignment gets messed up when the heading goes onto a second line. What it currently looks like: What I want: Here's the simplest...

In C++11, why does int16_t have a size of 4 when declared after a float inside a struct?

c++11,alignment,structure,sizeof,uint16
I have a data structure like this: struct mystruct { float f; int16_t i; }; sizeof(int16_t) gives 2, but sizeof(mystruct) gives 8 instead of 6. Why is that? How can I declare an int16_t variable of 2 bytes inside my data structure?...

C - get type alignment portably

c,types,alignment,portability
I'm writing really small interpreter for a very simple language, which allows for simple structure definitions (made of other structures and simple types, like int, char, float, double and so one). I want fields to use as little alignment as possible, so using max_align_t or something similar is out of...

Div not centering as expected

html,css,alignment
I'm trying to center the inner divs by setting the margins on the outer div, but it does not appear to be working. So my HTML looks like this: <div id="outer"> <div class="inner"><span>H</span></div> <div class="inner"><span>I</span></div> </div> My CSS looks something like this: #outer { display: block; width: 100%; margin: 0...

Div aligning right and changing x location depending on other Divs on the right side

javascript,jquery,html,css,alignment
Overall I would like to have something like this jsfiddle.net/DSghU/ Just that the the whole thing is not sliding out to the left. It shall slide out to the right. So that by clicking on the button the button is going completely to the right side. Edit I was able...

Aligning text next to a button with materialize CSS

html,css,alignment,materialize
I have a button and some text next to it. I'd like to match the text's vertical alignment with the button's. Here's what I have now: Basically, I'd like the or Sign Up text to go a bit higher. I'm using MaterializeCSS as well. Here's the code I have for...

minigw-w64 is incapable of 32 byte stack alignment, easy work around or switch compilers?

c++,windows,gcc,alignment,sse
I'm trying to work with AVX instructions and windows 64bit. I'm comfortable with g++ compiler so I've been using that, however, there is a big bug described reported here and very rough solutions were presented here. Basically, m256 variable can't be aligned on the stack to work properly with avx...

Centering CheckBox on JavaFX TreeTableColumn

java,checkbox,javafx,alignment,treetableview
thank you for reading my question. I'm working with a TreeTableView, and managed to display a Boolean value into one of the columns, by following the results proposed on this answer. It works perfectly, but when applied, the checkbox has a TOP_LEFT alignment, instead of the CENTER one (the CENTER...

Left aligned caption for center aligned responsive image

html,css,twitter-bootstrap,alignment
I can't make it work with Bootstrap 3. I have a center aligned responsive image like this: <img class="img-responsive center-block" src=""> and I want to add caption, which will be left aligned under the image. Any ideas?...

Vertical Align (line-height method) not working

html,css,position,alignment
My code in my HTML file is as follows: #firstblock h1 { font-family:'Open Sans'; font-size: 12vh; text-align: center; } #firstblock { position: relative; height: 200px; line-height: 200px; } <div id="firstblock"> <div id="title"> <h1>TITLE</h1> </div> </div> I see no reason why the vertical align is not working. I would appreciate any...

How to align an image-view for all android screens

android,imageview,alignment
I want to align an image view which is displayed same for all android screens expect for Android tab screen. Different alignment of imageview is noticed for imageview when app runs on emulator or live device. how do i align them properly?? Here is my activity.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"...

Align 3 divs within row div with text centered

html,css,alignment,text-alignment
Similar to How to align 3 divs (left/center/right) inside another div?, I am trying to align three divs within a parent div. Added complexity is that each div contains an image, text, and a link. I'd like these to be aligned link so: [[LEFT-IMG] [CENTER-IMG] [RIGHT-IMG]] text text text link...

Make the logo and links on the same line in header

html,css,alignment
I'm making a website and in the header I need a logo and a horizontal set of links. The logo must be on the left and the links must be on the right. The problem I'm running into is that if I add too many links to the list, it...

Prevent Vertical Centering of FlowLayout

java,swing,alignment,layout-manager,flowlayout
I have a JPanel using a FlowLayout layout manager and contains components with different sizes. EDIT: I want to use the FlowLayout because it allows the components to wrap to a new line when the container is resized and they no longer fit next to each other. The following image...

HTML text in JLabel ignores alignment with text-align: center

java,html,swing,alignment,jlabel
I need to to have text formatted in HTML. The text was therefore enclosed in HTML tags with proper color and alignment applied. The color settings works, but not the alignment set by 'text-align: center;'. Looking to center align HTML text in the 'botlabel'. Cleaning and rebuilding the project did...

Div centred on desktop but fixed to right on mobile. What's happening?

css,alignment
I'm having a problem with a logo I want centre aligned on a homepage. It works fine on desktop but as soon as I look on mobile it fixes itself on the right hand side and falls out of the frame. Here is the background image: #homebg { background: url(images/back.jpg)...

To align the same image to left, floating with the text in monitor screen, and to center, away from the text in mobile screen. How?

html,html5,image,alignment,media-queries
I'm developing a responsive article in one HTML file. Check my CSS and HTML examples, you can view how it is: http://jsfiddle.net/mnj0060e/1/ In any monitor screen, I align that image to left, floating with the text. But in any mobile screen, the image gets smaller, I don't know how to...