layout

Why does floated div sometimes inherit the margin of the following element?

Rather than trying to explain this, I'll give you the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html> <head> <title>weird</title> <style type="text/css"> div#sidebar { background-color: yellow; float: left; ...

Getting Android SDK WebView and TabWidget to play nice

I’m taking the HelloTabWidget Android example and trying two things: Moving the tabs to the bottom vs. the top (if that’s even desirable from an Android UI POV) Making each tab show a particular WebView in the space above I’ve got this for a layout (high level): <TabHost> <LinearLayout> <FrameLayout> <WebView/> <W...

Is it advisable to use the same xib in a UINavigationController view and a modal view?

I have a view (and corresponding view controller) in my iPhone app that allows the user to edit settings for the application. This view is accessible via a menu (a table view). I use pushViewController in my UIViewController subclass to get it shown. When I do this, it appears as I expect - the nav bar appears on top of the xib, and the ...

Silverlight 3 - Elements inside an element dont arrange sometimes

I have a grid/canvas that has an element (say an icon with an image and text overlayed) added to it dynamically via code. Most of the time it renders correctly when added (content is aligned properly inside it), but sometimes all the content sits in one corner. I can remove/add/remove/add/remove/add and it will eventually do it After...

How can I make a WPF element resize after rotation, rather than before?

I have a simple, horizontal <Line> element. This line has a RotateTransform applied to it, which slants the line at whatever angle I choose. The problem is that the rendered length of the line is calculated before the transformation is applied. The result is that the line no longer fits its parent element after it is rotated. My curre...

ASP.NET Saving webpage layout in a smart and fast way

Hello! I don't know what i should title this question regarding ASP.NET and saving a webpage layout. I will be referring to BBC just illustrate what i am after. http://news.bbc.co.uk/ The page will have around 10,000-20,000 visitors each day. I have one MS SQL 2008 database and i am programming ASP.NET (C#) 3.5. I am building a magazi...

Dynamic resize of Layout Manager areas

In which Swing layout manager it is possible to change layout areas programmatically? And how to do this with lowest cost? I have to create component with functionality similar to JSplitPane but with three panels from scratch. One of the moments is to Expand/Collapse one of the panels after clicking oneTouchExpandable button on the divi...

First thing to know about improving website layout and design

I am building an internal, data-heavy website for my company on the Microsoft stack (ASP.NET 2.0/C#/SQL Server). Lately I have been trying to improve the layout and design of this site, partly because I want it to look good for my employers, but mostly because I want to learn about page layout and design. My question is, what is the fi...

CakePHP XML view file

I would like to set CakePHP framework to allow page rendering when view file does not exist. I have all the definition set on layout and do not need extra empty files. Thanks! ...

Air app rendering under windows bottom gap ?

Greetings, Hi have this super simple Air app code Winxp Flexbuilder Flex 3.4 <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:ViewStack id="viewStates" height="100%" width="100%" borderStyle="solid" borderThickness="2" borderColor="red"> <mx:Canva...

What's my best option for XHTML standards compliant fixed spacing?

I'm trying to space out the items in this menu with the exact same number of pixels. In the 90s, most web developers I knew either used spaces or a spacer gif. These work, but they feel like bad hacks to me. There must be a better way to do this in 2009! I'm more of a back-end coder, so I've been out of the loop for a while. I'd apprecia...

WPF layout riddle

Say I've got two elements in a window. I'd like element A to fill all unused vertcial space and have always at least eg. 200px height. Element B will have few fixed sizes (expander) and it should be given the space it demands (but leaving at least 200px for A). If there is not enough free space in a window, B should be scrollable. That...

Swing listen for child layout changes

I have a JPanel and when its layout changes, I need to re-layout the parent. This can easily be done with panel.getParent().validate(), but the problem is, I don't always know if its direct parent, or maybe some parent somewhere in the tree is really the one that needs to be validated. Is there a way for a parent component to listen to s...

HTML: Anchor block element inside bottom of parent block?

Is there a cross browser method of attaching some content in a <div> to the bottom? One difficulty is that the <div> may have an arbitrary height applied, but I want certain content to be stuck to the bottom of it at all times. This would have been accomplished in the bad old days like this: <table style="height: foo;"> <tr><td va...

WPF Window with Style=None cover taskbar when Maximised after app initialization.

I want to achieve the same effect as Windows Media Player or Browser based Flash players which take up the ENTIRE (not even the taskbar is visible) real estate when maximised. This works fine if the WindowState is set to Maximised and the WindowStyle is set to None in XAML so the app is started in that state. Problem is I want to start ...

Shotgun vs Sequential Input Layout

I would like to determine which of the two layouts below is the better layout. I would like usability to be the main concern. Which one is better (in terms of usability) and why is it better? Shotgun Use as much of the horizontal screen width as possible without causing horizontal scrolling to occur. Obvious benefit is that vertical sc...

How do you use a partial in a layout template?

I have a partial that I'd like to use in a layout but when I load up a page it'll look in a different folder for the partial. So for my layout I've got. %html %head %body .content = yield .footer = render :partial => 'tracking' And in my layouts folder I have the partial file "app/views/layouts/_tracking.html.haml" that I...

How to create this type of element using XHTML & CSS?

I want to create an element using DIV & CSS like below: Create By: <avatar image 16x16> Prashant Can anyone tell me what will be the CSS and DIV code for above type of layout. I don't want to use tables for this, DIV and CSS only. In Digg listing you'll find the same kind of display, I tried but not able to make the "username" cent...

Layout: From Swing to Dojo

I've had some experience in Swing and now I'm trying my hand at writing an ajax app in dojo. I'm particularly having a problem with layout. In Swing I'm used to putting widgets in containers with layout managers for simple things like left-to-right layout to more complicated things like 4 border regions and a center region. After using ...

TextAttribute.TRACKING and LineBreakMeasurer

has anyone ever successfully used the java.awt.font.LineBreakMeasurer to draw word-wrapping text that has java.awt.font.TextAttribute.TRACKING (also known as letter spacing) set on the font? i create the font by: Map<TextAttribute, Object> map = new HashMap<TextAttribute, Object> (); map.put(TextAttribute.SIZE, 18); map.put(TextAttribu...