positioning

WPF Child element of a Canvas outside of rect bounds

I am creating a control where I am simulating a popup by using a canvas that contains a textbox and a grid container. The size of the canvas gets set to the size of the textbox and the textbox is positioned at 0,0 within the canvas. The Grid container is positoned at the y coordinate of the textbox and its visibility is set to Collapsed....

Do I need some kind of IE 6 hack for my page layout?

My site roofcommunityservices.org I am being told has some div shifting issues in IE6. We do not have IE6 here at the office, but I do use the Firefox render tool to view a screenshot si I get the general idea. I am on a Mac and can't see the same issues as my client. Could someone take a look at the site in IE6 PC and tell me what they...

jquery: Can you spell out how this position works? newbie to position using offsets etc.

Hi, Tracing this jquery autocomplete function, can someone explain in detail what is going on here? function showResults() { // get the position of the input field right now (in case the DOM is shifted) var pos = findPos(input); // either use the specified width, or autocalculate based on form element var iWidth = (options.width > ...

CSS: fixed to bottom and centered

I need my footer to be fixed to the bottom of the page and to center it. The contents of the footer may change at all time so I can't just center it via margin-left: xxpx; margin-right: xxpx; The problem is that for some reason this doesn't work: #whatever { position: fixed; bottom: 0px; margin-right: auto; margin-left: auto; }...

How can I control the location of a dialog when using ShowDialog to display it?

This is a very trivial problem but I can't seem to find a way of solving it. It's annoying me because I feel I should know the answer to this, but I'm either searching for the wrong terms or looking at the wrong methods and properties. I have a configuration dialog that's called from two places. The first is from the button on the form...

Positioning Bug <IE8 - Why? Best workaround?

I noticed that a site I'm maintaining had a little layout bug in FF/IE8/Chrome (on this page for example) - the image in the top left hand was a little high, straying into the header at the top. I wondered why I hadn't notice it when I took over the site, but I realise it has only since I upgraded IE7 to IE8 that it had become apparent ...

Get current scroll position and pass it as a variable with a link?

I'll be honest, I'm way out of my depth here. I've created a pagination system where you click on a link it reloads the page and a certain number of list items are shown in an unordered list. When you click it again it'll reload the page and more items showing. Think how Twitter shows the tweets in your feed. The problem is when it relo...

How to save portlet positions

Hello, I will be using jQuery's functionality to create portlet widgets for my web application suit. I haven't started as of yet, but will do soon, so this is the planning Now, currently, the page loads, and the widgets load into their default positions. A user can move them around, change their settings, whatever. Now, my problem is t...

Algorithms for positioning objects in a canvas

Where can i find some algorithm to position some objects in canvas in a clever way? I'm using javascript (with Raphael svg library), but examples with other languages (or pseudo-language) are welcome. Geometry isn't my strong point =) For example have 600x800 canvas, and i want to place n objects sized 60x60 in smart ways, for example: ...

XAML - get user control position relative to whole window as binding property

I'm new to XAML, so please be aware my question may contain some topic misundrestanding. Is it posible to bind XAML usercontrol global (relative to window) position to check if it's currently visible on screen? Usercontrol is inserted inside ScrollViewer and I think on something like: <UserControl x:Class="Test.MessageControl" ...

CSS - Positioning images next to text

Hi, I'm doing a site in which images need to presented next to textual content - a sort of pseudo two-column layout, as the images and text come from a single html source. I've found quite a simple way to do this by putting the images as their own paragraphs and floating them. Would there still be a more simpler way (in regards to htm...

Overflowing HTML line text before it gets obscured by right aligned content

I've got some text that is displayed on a single line in a container that has a fixed width. If the text can't be contained within the width of the container the overflow is hidden. Any combination of three status icons may appear positioned from the right hand side of the container. If any of these icons appear I'd like the text overflo...

CSS stop element from having greater height than parent

I approximatley this structure <div> <div id='1'> </div> <div id='2'> </div> </div> I want to make it so that when div 1's content becomes too large for it and div 2 to fit in the main div, it will get a scrollbar and not push anything off the bottom of the parent div. How can I do this in CSS? EDIT: the parent div (or rathe...

Asp.net modalPopupExtender repositioning

Hi there, By default, when using a modalPopupExtender from the ajaxControlToolkit - it is repositioned in the centre of the browser when the browser window is resized. I'm guessing this is some kind of javascript hooked into a window.resize method? I am altering the size of the panel associated with the extender, which puts the popup...

Maintain scroll position of a div within a page on postback

I have a div within an aspx page with overflow set to auto. The contents of the div are dynamically created and consists of a list of link buttons. <div id="div1" style="overflow: auto; height: 100%;"> ..... </div> When I scoll down in the div and click on any of the link buttons, the page reload loses the scroll position inside the ...

java file input with rewind()/reset() capability

I need to write a function that takes in some kind of input stream thing (e.g. an InputStream or a FileChannel) in order to read a large file in two passes: once to precompute some capacities, and second to do the "real" work. I do not want the whole file loaded into memory at once (unless it is small). Is there an appropriate Java clas...

Is there a way to find the distance of one element from another in jQuery?

I'm trying to figure out how to get the distance of an li from the top of the containing ul to allow me to position something next to it. However, using position() or offset() in jQuery seem to return a position from the top of the page or another higher element. Is there a plugin or any way to specify where you want the position calcula...

Absolute positioning in IE7 limiting width of div.

I'm working on drop down menus for this: http://www.heroicdreams.com/wordpress/elderFlashSite.html In every other browser it works great, but in IE7 the drop down widths are being limited by the size of the top link and it's margin. Is there a way to get IE to behave like all other browsers in that it will allow the drop down widths to ...

moving text while keeping background-image in CSS

hello, I have a 'main_menu' div which contains a background-image that is repeating on the y-axis. Above this div I have another div which is used for a header. The problem is that the header div has an image which is about 75px in height. I would like to start the text in main_div about 50 px higher from where main_div's background-imag...

What makes a Winform position initially stale?

The code below demonstrates a very simple problem; I am hoping that I am just missing a setting that someone might be able to reveal. Goal (1) Launch main winform (MainForm). (2) Press button to display secondary winform (ShadowForm) that is semi-transparent and should exactly overlay MainForm. What Actually Happens Scenario 1: Launc...