positioning

Dynamically changing the start up location of a WPF window

This is a follow up question to an answered question [here][1]. There the startup position of a WPF window was defined in XAML. Now I'm wondering how to change those properties in code? For example could I say something like: Window1.Top = 40 in the window load event handler? Or which window event would I need to set those for it dyna...

IHTMLElement2.getBoundingClientRect() does not work correctly.

Hi all, The getBoundingClientRect() does not work accurately for all cases. It fails when say a list of links that are side by side in a row and half of them are pushed to the next line because all the links cannot be fit into the same line. Now for the first link at the 2nd line the getBoundingClientRect() does not give correct results...

Flex: Difference between defining sprite's x, y coordinates, and painting object in some location

I have a task: I need to place about 100 sprites on one canvas (with prepared grid on it). I need to place them as invisible (circles) stones, on the board, and make visible only on mouseover. The problem I come across is following, I can't place those objects accurately into the nodes on the grid. E.g. if I define stones (it's just...

How to use CSS float without hiding parts of a DIV

When CSS float is used on a DIV, other DIVs that are not floated continue to occupy the space of the floated DIV. While I am sure this is intentional, I do not know how to achieve the effect I am looking for. Please consider this example: <html> <div style="width:400px"> <div style="width:150px;float:right;border:thin black solid"> ...

flex 3 component using x y as center, not topleft

Hi, How can I extend components like buttons to use x and y value as the center of the component, not the top left? Thanks, Jean ...

Creating C macro with ## and __LINE__ (token concatenation with positioning macro)

I want to create a C macro that creates a function with a name based on the line number. I thought I could do something like (the real function would have statements within the braces): #define UNIQUE static void Unique_##__LINE__(void) {} Which I hoped would expand to something like: static void Unique_23(void) {} That doesn't wor...

Can't get the table / news articles aligned properly

Hi there, For the life of me I can not figure out why my table will not display properly. 365-hosting.net/hosting2.html ( until source is corrected ) 365-hosting.net/style.css ( CSS file) I am only posting it this way because the automation of this help script feels it is spam. I have never openly asked for help before so this is new t...

Need help with CSS based absolute positioned UL alignment (dropdown effect)

Hey folks, I'm trying to a language switching system in this website. The idea is to have a SPAN which upon hover displays a dropdown box (UL based) that contains a list of available languages. Here's a snapshot of the effect I'm trying to achieve. The dropdown box is actually an unordered list that is hidden by default. Upon hov...

div tag for popup menu

Hi, I add a div tag and append it to the body and then i add to add items to the div so that it becomes a popup menu. After appending the to body, is there a way to move the div tag. Actually what i want to do is that i want the div to appear wherever the mouse was clicked on the webpage. By the way i am developing a firefox extension....

RichTextBox Text Positioning

Hello, I'm building a simple application, but I need to know how to use a RichTextBox and position the text on it, like: center, right and left. But how I can do this? ...

Absolute positioning in Flex?

I need to programmatically add a set of controls with some amount of pixels between them. I can't seem to find how to do this in the Flex docs. How can I do it? ...

How can I make my fixed position work in IE6?

I've have tried this: body {height: 100%;overflow: auto; body #cornerImage {position: absolute;bottom: 0;} and this: { margin:0; padding:0; } html, body { height: 100%; overflow:auto; } body #fixedElement { position:fixed !important; position: absolute; /*ie6 and above*/ bottom: 0; } Neither of these have wor...

Placing a Div dynamically under text box to show options

I have a webpage where i am trying to put a search feature.along with the search box, i put an image.When user clicks on the image i want to show a small div with some content(various filter options like "search in contacts,search in emails,search in trash etc").I want to place the div just below the search box. Now i want to know where ...

WPF Grid ellipse overlay position

Sor far I have: <Grid x:Name="MainLibraryGrid"> <TabControl Name="TabControl1" TabStripPlacement="Bottom"> <TabItem Header="300s"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> <ColumnDefini...

CSS Relative positioning overflow (squashed div problem) divs height expand with content?

Hi I'm trying to edit some css to include a border to the right and the left of my site. My problem is that when I make my height 100% or auto nothing happens, but when I change the height it works, but I can't use this as I want it to change with the content. I've noticed in expression web my sitegrinder div looks too squashed up the...

Absolute bottom positioning in relative div

I want to position "rightBottomPart" to the bottom of "rightPart" and I want "rightPart to be as high as "leftPart". The problem is that I don't know the height of the content in "leftPart" and therefore I can't set the height of "text". (Height in "text" would solve it) Right now it looks like this: and I want it to look like this: ...

HTML: iframe positioning

Hi, How can I "divide" a page up into a series of iframes and position them in this sort of fashion: http://img81.imageshack.us/img81/4605/layoutew.jpg where each "box" is a scrollable iframe, in my case containing a scrollable list of "Genres" in the first top-left pane, then "Composers" in the middle pane, etc. (NB: it's only really th...

Is possible to exactly find position of KeyPress event in browsers except IE?

From my recent question, I use KeyPress event for detecting '@' character in rich text editor. By the way, I just found that KeyPress event in other browser like Firefox 3.5 and Google Chrome 4 do not return any position in this event. For clarify, my position is a distance from top or left of screen. In this case, it should be distance...

Object Positioning Algorithm

I'm wondering if there is an "optimal" solution for this problem: I have a n x m (pixel) sized space with p preexisting rectangled - objects in various sizes on it. Now I want to place q (same sized) new objects in this space without any overlapping. The algorithm I came up with: Create array A[][] with the size [(n)/(size_of_object_...

Aligning text within a div tag doesn't come out on IE6 or IE7

I'm having a couple of problems with this site. Actually it's my lack of CSS skills that is the major issue. In any case, if you go to this page: http://winteradagency.com/Arvin/lifestyle/lifestyle.htm, you'll see that in the center area <div id="centerInc">, I want some text (aligned to the right and bottom) to be on top of the ima...