The layout tag is for questions about the placement, alignment and justification of objects with respect to a containing element.

learn more… | top users | synonyms

7
votes
1answer
116 views

Button-clicking UI for a game

I've been working on this game for a couple weeks now as a purely personal project to help myself learn Java. I'd like to know if I'm on the right track with my project. Items I'd like specific ...
3
votes
1answer
47 views

OOP and non-OOP versions of layout and page animation code

I am trying to learn how to write more object oriented javascript code, but I am having a hard time understanding the correct way to do it, and how it is useful for front end development. As you can ...
7
votes
0answers
56 views

Adapting layout for various iPhone and iPad screens using constraints and multipliers

My experience with autolayout tells me that it's very difficult to make app look good on whole variety of devices (from iPhone 4s to 6s especially). Size classes are useful with device position and ...
0
votes
0answers
30 views

Displaying three values with a title for each

I've created this layout to display three values with a title for each of them. The XML layout for the same is below. How can optimize this? The important thing here is the values are dynamic, but ...
2
votes
2answers
44 views

Ruby OOP convention/layout

I am new to programming and I have just written my first program. It takes files from an SD card and copies then into a new named folder and has the option to name the files themselves or simply move ...
1
vote
1answer
51 views

Adjusting the height of a div to match that of another column

This code checks whether an image whose parent is .papers.left has completely loaded into DOM and if yes then the background of ...
3
votes
0answers
62 views

Swing Component Resizer Class

I've created a class to help resize Swing components while maintaining their aspect ratio within a container. The class works by creating an instance and adding a container's components to it, then ...
2
votes
1answer
72 views

Managing Layouts in MigLayout

The following code creates a JFrame with a JTextField array in it. It also creates a JMenuBar...
1
vote
1answer
535 views

Udacity Intro to HTML and CSS layout sample

I'm going through the Udacity Intro to HTML and CSS course at the moment, and one of the exercises is to convert this mockup to HTML and CSS. I did the following, and it looks ok-ish: HTML: ...
3
votes
1answer
434 views

HTML and CSS markup for flexible form layout

I'm trying to have a HTML / CSS structure for flexible layouts for forms. I tried to look at Bootstrap codes for help with this (without actually using Bootstrap itself). I've gone with something ...
4
votes
1answer
257 views

Optimizing pagination of HTML tables

I'd like to share my implementation to you to confirm if it's a correct way to solve my problem. I have a list of products which have an attributes table and a description table (both in html_encoded ...
5
votes
2answers
214 views

Periodic Table generator

I've been playing around with Jekyll and CoffeeScript the last few days and made a Periodic Table to learn those two. Now, to create the Periodic Table, I take an array of ...
5
votes
1answer
84 views

JFrame with four sliders

I am writing a control panel with Sliders but I think my code is messy and cumbersome, what can I do to improve it? ...
2
votes
1answer
325 views

Design a row in a listview

I want to design a row of the following style in my Android project: I have the following code for this: ...
1
vote
1answer
494 views

Search layout with 2 edittext and 2 buttons

I'm building an Android app and I'm new on building the UI on an .xml file. I've built a simple layout but I think that is not optimize very well. This component is a search layout with 2 edittext ...
1
vote
1answer
343 views

Optimizing a Google card layout

I'm developing an Android app in which I would build a card layout with a custom library. I think that my layout has not been optimized, but I don't know how I can this. It's not a very simple layout ...
5
votes
1answer
247 views

Vertical-align in Nested Column

Requirements: There are two columns. The left column is fixed width. The height of two Column should be the same. Left column contain a title (can be multi-line) and an Image (limit max width to ...
10
votes
7answers
2k views

Overlap detection for laying out elements on a page

How would you simplify/improve the readability of this code? Because even after my attempt to improve the readability I think it still looks messy. ...
3
votes
2answers
149 views

Align text (left, center, right) without additional packages

I wrote this short subroutine to left, center, right-align a multiline string. How can I make it better (shorter, prettier, optimized)? Can you offer some suggestions? ...
7
votes
1answer
192 views

Incrementing letter-spacing of one line of text

I was asked to create a script which will increment the letter-spacing of one line of text, until its width matches that of the first line; for use in headline/subheadline text to maintain a block ...
8
votes
1answer
78 views

Honey I shrunk the view

Going down the rabbit hole, I wanted to be able to change the size of a form, and not have to worry about the layout of the controls. vba doesn't support user-resizeable forms, but forms still have a ...
3
votes
1answer
6k views

Android layout with equal spacing between elements [closed]

I am trying to make a nice set of items, which are equally spaced from each other. On example below, I set buttons between empty textview. Every button and text view has ...
6
votes
1answer
360 views

Alternative to a Grid in a StackPanel form for an easier way of inserting new rows

In my real life example I am at a layout stage and before I actually move any further I would like to review my current approach. I am still learning about UI, XAML on WPF technology and I guess I ...
4
votes
1answer
386 views

Should I split code into smaller functions? Advice on layout

I have the following code. I was wondering if anyone can give me any pointers on how to make this more concise and neater? Should I be splitting this down into smaller functions? ...
3
votes
1answer
279 views

Am I over using <ul> for layout?

I want to create a small web widget, you can see it at this jsfiddle. Right now it is organized by placing lists within lists and content within those lists. All of this is supposed to sit, as a bar, ...
6
votes
1answer
7k views

Dividing the screen in two halves using LinearLayout

I want to divide the screen in two halves. The layout is locked on portrait mode. The top half will have one button and the bottom half will have many buttons. That's why I choose this division, since ...
4
votes
4answers
220 views

Improve HTML structure?

I am not new to html however would like to know about best practices. I need to develop a layout like this: This is what I have proposed: ...
4
votes
1answer
98 views

Webpage Template

Introduction I am designing a website as a hobby. As you can probably tell from the code below, I am an absolute beginner. The first thing I'd like to do is to create a nice webpage template that I ...
1
vote
1answer
313 views

Resizing table widths and making input fields

I am trying to simplify my code, which will do several things: Give the same width to every columns no matter how many columns the table has. add input field if there is no texts inside a td make ...
1
vote
2answers
168 views

How's my and my father's java ODE Solving and Graphing Program?

At the request of my father, I've adapted some C# code he wrote which uses a timer to display the true and approximate solutions of the ODE y' = -lambda*y in real time to do the same in java and then ...
4
votes
1answer
293 views

GUI layout for a security camera app

I'm designing a security camera program. Right now, I am just trying to set up the GUI before receiving. I am using Kivy since, in the future, I plan on designing some programs for Android. I really ...
1
vote
2answers
3k views

Nested layouts - BoxLayout inside BorderLayout

I have this code: ...
2
votes
1answer
460 views

HTML - single page layout - absolute positioning

I am doing web apps, mostly single page apps. So i have to give absolute and fixed positioning a lot via css. For Example, consider this page layout: ...
1
vote
1answer
603 views

Java Swing Panel layout [closed]

I am working on a Java project for college that involves us setting up a TCP Server and Client. I have that part working and now to add more of a feel to my project I want to add a GUI. We have not ...
12
votes
2answers
10k views

Is nesting grids a good idea?

I find myself nesting a lot of grids inside grids in WPF. I just found myself 3 Grids deep, and stopped to think: "Should I be doing this?" Is there some kind of performance cost? Is it unmaintainable?...
3
votes
3answers
441 views

Web register form

This is a page that allow user to do register: ...
3
votes
1answer
1k views

wxPython Form Builder - Sizer Automation

Presented for critique are a pair of classes which automate Sizer Creation and Layout in wxPython. ...