alignment

Put an X on the topright of a div without making the top clickable

I have a rect and have an X on the top right with items inside of it. The div with the X is clickable. The problem is the whole top area is clickable and not just the topright (the 'X') as i wanted. How do i make only the X clickable and still align to the right? my css is .itembox { float:left; } .itembox .RemoveMediaNotif { ...

How do you align a block item to the right edge of its parent (with CSS)?

I am aware that you can center a block item by setting the left and right margin to auto. However, is it possible to align it to the right edge? And how would this be done? Edit: without using float: right (because it doesn't seem to work, at least not with <ul>'s) Edit again: Here is a snippet of the code: <td style='vertical-align:...

C 64-bit Pointer Alignment

Are pointers on a 64-bit system still 4 byte aligned (similar to a double on a 32 bit system)? Or are they note 8 byte aligned? For example, on a 64-bit system how big is the following data structure: struct a { void* ptr; char myChar; } Would the pointer by 8 byte aligned, causing 7 bytes of padding for the character (total...

How can I align an element of a struct?

Is there any way to force an alignment of a particular element of a struct using a GNUism? ...

TinyMCE Image Alignment

TinyMCE has always been a little difficult to align images. Either the align tag, or adding style="float: left;" has been it solution. Ideally I would just like to add class="left" or class="right" so that I can set the border and margins of the image. Up until now the only way to do this without using the advimage plugin was to insert ...

Exemple where TYPE_ALIGNMENT() fails

Hi, I have a question relating to alignment in c/c++. In http://stackoverflow.com/questions/364483/determining-the-alignment-of-c-c-structures-in-relation-to-its-members Michael Burr posted this Makro: #define TYPE_ALIGNMENT( t ) offsetof( struct { char x; t test; }, test ) in the comments someone wrote this might fail with non POD ...

Latex letter: Address right aligned

Hi, I am using Latex letter class, and would like the address to be right justified. The default is for it to be in a right aligned block, justified to the left. I am happy to change the letter.cls file, but haven't been able to figure out the right way to do it. I have tried using sclttr2 instead but there are too many variables for...

Flex ComboBox items go out of alignment

I have a combobox that uses a custom itemrenderer to display an image. when scrolling up and down the list the images randomly go out of alignment. How do I stop this? public class PinRenderer extends UIComponent implements IDataRenderer, IListItemRenderer { private var currentPin:DisplayObject; private var _data:Object; ...

How can I force the text go to the button of the panel?

At the moment I have the following code which works fine. label = new JLabel(panelLabel,SwingConstants.CENTER); outputPanel.add(label,BorderLayout.CENTER); I get the text in the center of the panel (in terms of the left-right position as well as in terms of the top-bottom). Now I want to set the position to the bottom (and center in...

Font advance calculation problem on Blackberry OS 5.0

I am currently working on my own implementation of a tab bar for a BlackBerry app, where each tab bar has a title that is right aligned (i.e. the last character in each should be the same distance from the right hand side of the screen). To work out where to draw the text I am using the following calculation: screen width - advance of t...

How to align this div contents properly?

Here is my layout, I am using one div and many spans for getting the above view... Look at all the rows ther are not properly aligned... <div class="resultsdiv"><br /> <span style="width:200px;" class="resultName">' + employee.Emp_Name + '</span> <span class="resultfields" style="padding-left:100px;">Category&nbsp;:</span>&nbsp; <spa...

android: how to align image in the horizontal center of an imageview?

I've tried all scaletypes, but all of them result in the image to be at the left corner of the imageview. <ImageView android:id="@+id/image" android:scaleType="centerInside" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="6dip" android:background="#0000" ...

Aligning multiple images into one image?

What is a good method to align images together that may have different rotations, exposures, etc, but have the same background or other fixed reference? Adobe Photoshop can do this with its "Photomerge" feature. How can I do this programatically? Is there an Open Source application that does it? ...

IE7 div floating bug

I have the following <div id="border" style="width:100%; border:8px solid #FFF"> <div id="menu" style="width:250px; float:left;" > Some menu </div> <div id="content" style="padding-left:270px; width:520px;" > Main page content </div> </div> This gives me a left aligned menu and the content to the right ...

How to align 3 divs (left/center/right) inside another div?

I want to have 3 divs aligned inside a container div, something like this: [[LEFT] [CENTER] [RIGHT]] Container div is 100% wide (no set width), and center div should remain in center after resizing the container. So I set: #container{width:100%;} #left{float:left;width:100px;} #right{float:right;width:100px;} #center{ma...

C# WinForms Vertical Alignment for TextBox, etc.

I'm working on a project updating their WinForms application UI to be more consistent with sizes. TextBox and ComboBox controls have different heights by default, even with the same font. I've been able to resize the text boxes by turning off AutoSize, but the text still hugs the top of the control, leaving a gap below. Is there any...

How does sizeof calculate the size of structures

I know that a char and an int are calculated as being 8 bytes on 32 bit architectures due to alignment, but I recently came across a situation where a structure with 3 shorts was reported as being 6 bytes by the sizeof operator. Code is as follows: #include <iostream> using namespace std ; struct IntAndChar { int a ; unsigned c...

returning aligned memory with new?

I currently allocate my memory for arrays using the MS specific mm_malloc. I align the memory, as I'm doing some heavy duty math and the vectorization takes advantage of the alignment. I was wondering if anyone knows how to overload the new operator to do the same thing, as I feel dirty malloc'ing everywhere (and would eventually like to...

gcc memory alignment pragma

hello. Does gcc have memory alignment pragma, akin #pragma vector aligned in Intel compiler? I would like to tell compiler to optimize particular loop using aligned loads/store instructions. to avoid possible confusion, this is not about struct packing. e.g: #if defined (__INTEL_COMPILER) #pragma vector aligned #endif for (in...

Align the coordinate labels of the triangles, so that they never collide with each other. Actionscript 3

Hi all, Im trying to achieve something similar to the flash movie in the below link. http://mathopenref.com/coordtrianglearea.html As we drag the points of the triangle, the coordinates labels, ( A(1,2)) are properly aligned and arrange themselves so that they never collide with each other and never falls inside the triangle. Please ...