alignment

Float 2 divs in a parent div and arrange such divs one below another

Hi, I am creating a web page with 3 columns. The middle column is where all the content goes. The content I want to enter has to be in the format of left aligned image, followed by some text next to the image. And this flows throughout the column with different images and corresponding text. Since my layout is a div based layout, I have...

Absolutely centered content inside a WPF layout panel

I need to find a way of absolutely centering the content of a LayoutPanel in WPF. I have two textblock elements which must render at the vertical and horizontal center of the panel without relying on absolute heights and widths. This is something i can do quite easily with a single element since any ContentControl can have it's verti...

long long alignment problem (MSVC vs. GCC)

I'm writing C cross-platform library but eventually I've got error in my unittests, but only on Windows machines. I've tracked the problem and found it's related to alignment of structures (I'm using arrays of structures to hold data for multiple similar objects). The problem is: memset(sizeof(struct)) and setting structures members one ...

Why does the Mac ABI require 16-byte stack alignment for x86-32?

I can understand this requirement for the old PPC RISC systems and even for x86-64, but for the old tried-and-true x86? In this case, the stack needs to be aligned on 4 byte boundaries only. Yes, some of the MMX/SSE instructions require 16byte alignments, but if that is a requirement of the callee, then it should ensure the alignments ar...

CSS problem with IE - right-alignment does not work in a div inside a table cell

Float:right specified for a div inside a table cell seems to have no effect in IE. I have also tried text-align right, among other things, to align the layer contents to the right, but without success in IE 7. CSS snippet: .workloadcell { background-color: #E6D7E9; padding: 0px; width: 14px; height: 16px; text-alig...

Right Float and container div

Hi, I have 3 divs in a container div. The first is floated left, the second is floated right and the last sits in the center. This creates 3 approximately even divs across a container div. In each of these divs I am placing an image of varying heights. Then there is a separate div to sit below the container div which will be the full w...

What is the best way to left align and right align two div tags?

What is the best way to right align and left align two div tags on a web page horizontally next to each other? I would like an elegant solution to do this if possible. ...

Flex - Vertically position children of a horizontal HBox

I have a custom HBox as so.... public class MyBar extends HBox { public function MyBar() { super(); this.height = 65; this.percentWidth = 100; var newButton:Button = new Button(); //..... newButton.y = 20; var spacer1:Spacer = new Spacer(); spacer1.percentWidth = 50; var spacer2:Spacer = new Spacer(); spacer2.percentWidth = 50; t...

.net dropdownlist align text

I am trying to align the text in my .net dropdownlist to the right. Using CssClass I am able to align text to the right in Firefox. IE doesn't not align text to the right it aligns to the left. I have read that IE 6 doesn't support this. Is this true? I am using IE7 but most of my users will be in IE 6 so, both need to work. <asp...

JPanel flipping out, FlowLayout not working as intended

Hi, The other day this code was working. I changed some things and re-ran it and now it doesn't work as intended. Obviously something I changed altered the behaviour, but I have gone back and reverted all of those changes and it still doesn't work. Disregarding that bit of information (to start), why the hell does this code not place a ...

C# StructLayout/FieldOffset and indexing in arrays

I'm having a bit of a problem using FieldOffset correctly with arrays. The code below is an example where it doesn't work correctly for me: [StructLayout(LayoutKind.Explicit)] public struct IndexStruct { [FieldOffset(0)] public byte[] data; [FieldOffset(0)] public short[] idx16; [FieldOffset(0)] public int[] idx32; } If I for ...

GCC __attribute__((aligned(x)) explanation

Hi, i have the following code: #include <stdio.h> int main(void) { float a[4] __attribute__((aligned(0x1000))) = {1.0, 2.0, 3.0, 4.0}; printf("%p %p %p %p\n", &a[0], &a[1], &a[2], &a[3]); } And i have the following output: 0x7fffbfcd2da0 0x7fffbfcd2da4 0x7fffbfcd2da8 0x7fffbfcd2dac Why the address of a[0] is not a...

Delphi Array Alignment set to 4, 8, or 16 byte boundaries?

I would like to use the FFTW C library from Delphi 2009 and according to this documentation; http://www.fftw.org/install/fftw_usage_from_delphi.txt to increase the performance inside the FFTW library (such that it can use SIMD extensions) arrays passed in of either Single (float) or Double (double) need to be aligned either at 4 or 8 b...

ActionScript 3, Flash Player 10 - 3d carousel changes perspective, alignment issues

We made a 3D carousel with the new native 3D support from flash. Now when I resize, my carousel should drag along the middle. Which it does fine. But for some reason the perspective doesnt come along, therefore it looks like the more i resize, the more the carousel is leaning to the left side. The carousel is set up very simple. Everyt...

Union element alignment

If I have a union, C standard guarantees that the union itself will be aligned to the size of the largest element. union U { long l; int i; short s; char c[2]; } u; But what does it say about alignment of individual union elements inside the union? Is the following expression guaranteed to be true? (&u.l == &u.i) && (...

CSS <li> background image position issue

at http://www.goodshow.tv I've got a problem with the nav. I have a class that puts an arrow image, which should line up with the right edge of the white border. Problem is, it bases the position on the left side of the text. Is there a more absolute way to position it? ...

C alignment at NOT a power of 2

In gcc there is a directive called .align that allows me to align things at boundaries that need to be a power of two. However, on my Intel Core Duo machine I want to align some code (not data) at addresses that are NOT powers of two. Is there any straightforward way to do that? Because obviously, .align 3 gives me the error: Error: ali...

Aligning matrices vertically as well as horizontally in LaTeX

I'm trying to accomplish this in LaTeX: ⎡a⎤ ⎡b … n⎤ ⎢⁞⎢ ⎢⁞ ⋱ ⁞⎢ ⎣x⎦ ⎣y … z⎦ [a … x] I'm able to get a vector + a matrix on one line, but I'm not sure how to align the vector below so that it sits perfectly under the large matrix. Here's a less-unicode text representation of the 'drawing' above: [a] [ b c ] [d] [ e f ] ...

WPF c# Context Menu Text Alignment

Hi, i am building a context menu for a WPF c# application and just for simplicity's sake, if i have text and then i add an image, the text is always aligned at the top of the menu items cell and i cant figure out how to align it to the center. i have tried the veticalalignment property and veticalcontentalignment property but they dont h...

interlocked operation on unanligned data

Hi; The win32 interlocked functions provide a mecanism for atomic operation on data. They are supposed to be thread-safe and multiprocessor-safe. What happen if the data is not aligned? the interlocked operations are still atomic? Ex.: incrementing a integer that is not aligned. Ty ...