layout

Why do small spaces keep showing up in my web pages?

This might be a stupid question but if there's a better or proper way to do this, I'd love to learn it. I have run across this a few times, including recently, where small spaces show up in the rendered version of my HTML page. Intuitively I think these should not be there because outside of text or entities the formatting of a page's H...

How do I make a WPF data template fill the entire width of the listbox?

I have a listbox data template in WPF. I want one item to be tight against the left side of the listbox and another item to be tight against the right side, but I can't figure out how to do this. So far I have a grid with three columns, the left and right ones have content and the center is a placeholder with it's width set to "*". Wher...

With DojoX Layout, is it possible to replace the content of a layout?

I have a div in which a page is loaded with the DojoX Layout capability: <div dojoType="dojox.layout.ContentPane" adjustPaths="true" renderStyles="true" executeScripts="true" href="my/page/containing/scripts/and/styles/in/a/sub/folder.html"> Initial cont...

Dynamic radio button creation

In wxPython, if I create a list of radio buttons and place the list initially, is it possible to change the contents in that list later? For example, I have a panel that uses a boxSizer to place the widgets initially. One of those widgets is a list of radio buttons (I have also tried a normal radiobox). I would like to dynamically chang...

CSS centering tricks

My favorite equation for centering an xhtml element using only CSS is as follows: display:block; position:absolute; width: _insert width here_; left:50%; margin-left: _insert width divided by two & multiplied by negative one here_ There's also the simpler margin:auto method in browsers that support it. Does anyone else have tricky way...

Asp.net formatting lists of grouped data

I have a asp.net page where i query a list of url and the groups in the urls. In the code behind i loop through each group and create a group header and then list all of the links. something like this: Group 1 Link 1 Link 2 Link 3 Group 2 Link 1 Link 2 Link 3 Now that i have a lot of links, this create one long list on the p...

Restoring UI settings in C# WinForms - which event to respond to?

When is the proper time to restore the UI layout settings of a System.Windows.Forms.Control? I tried this: FooBarGadget control = new FooBarGadget(); parent.Controls.Add(control); control.FobnicatorWidth = lastLayoutSettings.FobWidth; No cigar. Reason? control isn't finished laying out its internals; it's in its default size of 100x1...

How can I find the Rect of wrapped text on an iPhone?

Can anybody recommend a good method for determining the Rect of some wrapped text on an iPhone? I've tried all the built-in methods for NSString in the 2.1 SDK to no avail. The size methods never return sizes that allow me to completely fit wrapped text in my custom view. I'm drawing some user customizable text that should always be a...

wxPython: displaying multiple widgets in same frame

I would like to be able to display Notebook and a TxtCtrl wx widgets in a single frame. Below is an example adapted from the wxpython wiki; is it possible to change their layout (maybe with something like wx.SplitterWindow) to display the text box below the Notebook in the same frame? import wx import wx.lib.sheet as sheet class MyShe...

Can I speed up the YUI layout manager, when I have a large table on the page?

I am using the YUI layout manager which seems to work at an OK speed. However if the page contains a large <Table> with about 500 rows, the YUI render() function takes about a minute longer to run. When I open the same page without the layout manager it opens in less than a second. My only concern is with IE 7. I tried it on firefox an...

CSS: Two 50% fluid columns not respecting min width

I'm trying to use this layout with two 50% column width instead. But it seems that when the right columns reaches its 'min-width', it goes under the left column. Is there any way to use the 'shim' technique to set a min-width to the wrapper so both columns stop resizing. Thus, eliminating the problem of the right column finding itself un...

Rails check if yield :area is defined in content_for

I want to do a conditional rendering at the layout level based on the actual template has defined content_for(:an__area), any idea how to get this done? ...

table layout wrong in IE(7)

below is the code of a simple html with a table layout. in FF it's looking as i think it should look like, in IE7 it doesn't. what am I doing wrong? and how can I fix it? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <TITLE>test</TITLE> </head> <body> <table id="MainTable" cellspaci...

Nested Scroll Areas

I creating a control for WPF, and I have a question for you WPF gurus out there. I want my control to be able to expand to fit a resizable window. In my control, I have a list box that I want to expand with the window. I also have other controls around the list box (buttons, text, etc). I want to be able to set a minimum size on my c...

Where can I find examples of element heavy web forms?

I would like to look at some examples of some good form layouts (web-based) that have a lot of input fields. I do a lot of web application development and a lot of my forms are input element heavy so I am always looking for good ideas on how to display my forms. For example I have a few list boxes and a lot of text boxes and some drop do...

What is the best absolute width for a webpage?

Assuming a fluid layout is not an option (since that is a different discussion all together), what is the recommended width for a site layout? What are the pros and cons of different sizes? ...

Windows Forms Layout Engines

Does anyone have or know best practices for implementing a custom layout engine in WinForms? I've seen the windowsclient.net link, but it's a bit dated (Sept 2001). ...

How to make a bilingual site without creating a separate ASP page for each language?

I need ideas on how to go about table layout problem. I want to set different width of the columns dependent on the picked language. ...

Dynamically Positioned Flex Components

I have a requirement on my current project (a Flex app which will be run in Flash player) to display an arbitrary subset of the components on a form while hiding all the other components based on certain aspects of the application state. There are about a dozen different text boxes and drop downs, but some become irrelevant based on pre...

How does CSS clearing really work?

I have a <div> that I want to be on a line by itself. According to W3Schools, this rule: div.foo { clear: both; } ...should mean this: "No floating elements allowed on either the left or the right side." However, if I float two <div> elements left, and apply the rule above to the first one, the second one does not budge. On the...