layout

Keep resizing text from pushing the other elements in its container around?

I have the following html <div id="menu"> <ul class="horizMenu"> <li id="active"><a href="#" id="current">About</a></li> <li><a href="#">Archive</a></li> <li><a href="#">Contact</a></li> <li><a href="#">Item four</a></li> <li><a href="#">Item five</a></li> </ul> </div> and in th...

How do you keep parents of floated elements from collapsing?

Although elements like <div>s normally grow to fit their contents, using the float property can cause a startling problem for CSS newbies: if floated elements have non-floated parent elements, the parent will collapse. For example: <div> <div style="float: left;">Div 1</div> <div style="float: left;">Div 2</div> </div> The pa...

How to reduce space between JCheckboxes in GridLayout

Hi everyone, I have three Java JCheckboxes in a column, arranged by setting the layout of the container JPanel to GridLayout(3, 1, 1, 1). When I run the program, there is too much vertical space between the JCheckBoxes; it looks like more than 1 pixel. Since I've already set the vertical space between the JCheckboxes in the layout to ...

Can I define a cross container TabIndex order in XAML (or code-beside)

Control.TabIndex Only allows me to overide the Tab order of controls in a given container. Is there a way to specify this across all the controls in, for example a UserControl, regardless of the contains used to arrange the controls. Cheers, Jan ...

Myspace Music Layout Question

How do I push my content to the top of the page to not cover up the ad, but to cover the menu and myspace links. I want to do something similar to: http://www.myspace.com/sensesfail and http://www.myspace.com/attackx2. Thanks. ...

How do you debug Qt layout problems

I've got a complex dialog, and it is full of whitespace and I can't shrink it. In Designer, it has lots of components that then get dynamically hidden, and a few which are dynamically added. I've added dumping of size policies, size hints, and minimum sizes, but still can't figure out why Qt won't let me drag it smaller. There must be...

How do I make an item in a toolbar fill all available space in WPF

I'm trying to make an item on ToolBar (specifically a Label, TextBlock, or a TextBox) That will fill all available horizontal space. I've gotten the ToolBar itself to stretch out by taking it out of its ToolBarTray, but I can't figure out how to make items stretch. I tried setting Width to Percenatage or Star values, but it doesn't acc...

Best way to size containers in Flex to obey ONLY parent containers' explicit dimensions

I've been running into this problem with Flex for nearly a year, and each time I work up a quick hack solution that works for the time being. I'd like to see if anyone has a better idea. Here are the conditions of a problem: |------Container ------------| | explicitHeight: 400 (or whatever) | | | |-----...

Size-to-content-layout problem in WPF

This is supposed to be a no brainer but I still can’t figure it out. In my sample app there’s a button and a textbox in a dockpanel. If the content of the textbox is smaller than the content of the textbox the window is as big as it needs to be to display the content of the button. That’s what I want. But if I put more text into the tex...

Java GUI LayoutManagers

I'm busy with an asignment where i have to make a graphical interface for a simple program. But i'm strugling with the layout. This is the idea: What is the easiest way to accomplish such a layout? And what method do you use to make layouts in java. Just code it, or use an IDE like netbeans? ...

A Firefox tool that shows object and element structure on hover?

on any element in the webpage. I need to look at what the element and children elements are. For e.g. ...

CSS Layout tricks

I am experementing for the first time with css layouts (have experience of the very basic css setup). All I want to achieve is a 2 column layout (left panel and content). I have found this: #leftcontent { position: absolute; left:10px; top:10px; width:170px; border:1px solid #C0C0C0; padding: 2px; } #centercontent { position...

how to keep inline items from wrapping?

I've got menu items that look like this <ul> <li>Item1<span class="context-trigger"></span></li> <li>Item2<span class="context-trigger"></span></li> <li>Item3<span class="context-trigger"></span></li> </ul> with CSS that turns the above into a horizontal menu, and JS that turns the [spans] into buttons that bring up contextual m...

Can you find a solution using just css, to make an element centred when it appears on its own, and aligned to the right when it appears with another element?

The problem: We have a page that ordinarily has two elements arranged side-by-side. <div id="container"> <div id="element1">content</div><div id="element2">content</div> </div> But in some conditions only element2 is on the page e.g.: <div id="container"> <div id="element2">content</div> </div> Despite exploring a few angles fo...

Best way to represent a wide grid for printing?

We have many WIDE html grids which scroll horizontally within a DIV in our web application. I would like to find the best strategy for printing these grids on a portrait A4 page. What I would like to know is what is the best way to present/display grids/data like this. This question is not HTML specific, I am looking for design stra...

Any advice on 'breaking' an object out of its layout in Flex - for animation purposes?

If I have an object in a layout in Flex what is a good way to 'break it out' of that layout to be able to animate it. For instance I have an image and a caption arranged at an angle. I want to make the image 'zoom out' slightly when the mouse rolls over it. Since its in a layout container is active if I were to resize it then obviously ...

Do you group private fields or put them with their property?

I've seen (and used) on various projects this layout, with a group of fields followed by a group of properties: private int MyIntField; private string MyStringField; public int MyInt { get { return MyIntField; } set { MyIntField = value; } } public string MyString { get { return MyStringField; } set { MyStringFiel...

Changing Keyboard Input language in Java

Is there a way to set/change the keyboard input language in Java (eg from English to German)? Example Use Case: Script to be used for playback is recorded (typed in) on a German keyboard. The automated playback is done on a English keyboard...fails if keyboard is not set to German automatically before script is run. ...

Css margin-top vs margin-bottom

If you have a sequence of block elements and you wanted to place margin in between them. Which do you prefer, margin-top or margin-bottom or both? Why? ...

Full-height CSS layout, with multiple columns

I have a layout that is working, but it has one very annoying problem.. when the content is taller than the screen, the background stops. This is the desired layout in bad-ASCII-art format: _____________________ _ | | long |logo| | | | content | | | | | | | | | | | | | |grad| |gr...