Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [layout]

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

4
votes
1answer
27 views

Position logo in middle of nav

I've recently migrated away from floats and have started using flexbox to build my grids. My navigation has 4 menu items. I'd like my logo to sit in the middle of these. To maintain a good page ...
0
votes
0answers
25 views

Table th/td absolute positioning: 1px dislocation

Table th/td absolute positioning: 1px dislocation when the table is scrolling, the last column is fixed. The last column of cells use absolute positioning. Firefox / Edge / IE, have a 1px ...
6
votes
0answers
37 views

Ultra-simple, automatic, non-float, 1-4 column, grid system

Has everyone moved over to CSS Grid and/or Flexbox? If not, I've maintained and evolved this system over a fair amount of time, the concept was derived originally, I believe, from Mary Lou, although I ...
1
vote
0answers
16 views

Reduce components in an android layout with GLSurfaceView

I would like to optimize this layout to improve rendering speed. How can I remove so many unnecessary components from the layout file? ...
1
vote
1answer
89 views

Sign Up layout in android

I have created a sign up layout as image below. Does this part of code looked bad since the dp I used for the floating button are quite large. ...
1
vote
0answers
27 views

Making a lot of similar looking views in Android layouts

I'm getting started with Android development. Take a look at this Android layout file: ...
1
vote
2answers
31 views

Code to make elements fit within their container while keeping their aspect ratio

This function receives the id of an element (frame) and calculates the correct height and width so it fits inside its parent element, while keeping its aspect ratio. Before I had a way to calculate ...
4
votes
3answers
64 views

Breaking group of items into rows then ensure consistent height of each row element

I'm working on a product category page where the product images have inconsistent heights so I've been asked to improve the page appearance without changing the images. The page contains x number of ...
3
votes
2answers
46 views

Making the font as big as possible without overflowing each div

I made a function that makes font sizes in <div>s as big as possible without overflowing. It takes a long time to run. How do I optimize this? ...
3
votes
2answers
82 views

Rearrange page numbers for printing a book

I didn't want my title to be too long so to clear up any confusion I'll explain better here what my code does. It asks for the total pages of a book(PDF file in my case), and returns the page numbers ...
0
votes
1answer
34 views

Large poster with positioning elements

Ignoring the text inside, what is there to be improved? This is supposed to be a poster for my Food Technology homework, but after getting some review from the informational side, I'd like some ...
2
votes
0answers
201 views

JustifiedCombobox, A subclass of ttk.Combobox that has adjustable pop-down list item justification

In an attempt to answer How to justify the characters in the drop-down list of a Combobx? I've come up with this code. JustifiedCombobox justifies the pop-down ...
4
votes
1answer
812 views

Layout for a Tkinter form

I am making a GUI application for a class. I have made the form layout (make_form()) using both Frame and grid, but I am not exactly sure that one should be mixing ...
5
votes
1answer
820 views

Plotting text from a dictionary with Matplotlib

I have the following dictionary: ...
17
votes
3answers
2k views

HTML page listing product characteristics

I am using below code in site. i am using lot of html "br" tags. Is this the proper way? or may i add css class for those lines instead of ...
0
votes
2answers
285 views

onResize and onLoad handlers to toggle mobile layout

I'm currently using onResize and onLoad in javascript code. Both events are coded identically so I was wondering if there is a way I could combine both into just one. ...
2
votes
1answer
301 views

Function to determine the appropriate dimensions for a close button

How can I reduce the cyclomatic complexity of this CloseButtonDimensions function? ...
2
votes
2answers
260 views

RTL management HTML & CSS

I've been working around a solution to easily manage LTR and RTL on the same interface. The different solutions I knew at first: Override CSS according to direction. Use a program to transform your ...
3
votes
0answers
1k views

Creating Android layout with GridLayout

I'm trying to create a Layout with two columns which are next to each other (I'm accomplishing this behavior with a LinearLayout). Inside each column, I have two TextViews and two Buttons, which I ...
2
votes
1answer
53 views

Change page formatting for all worksheets to fit on paper

I have the below code that will loop through all worksheets of the workbook and will format each sheet by deleting, change page orientation, page margins and be able to print each sheet on 1 paper. ...
3
votes
2answers
69 views

Better way for many components?

I have coded a system where each 'Player' class requires 5 components (could be more in the future, up to 10, 20 maybe even 30, once we add more and more features). What I want some advice on is a ...
5
votes
1answer
69 views

Flexbox layout, columns, rows, multiple heights

I wanted everything to just snap into place, but found I had to add spacing to some of the items in order to line them up. It's still neater than trying to float things, and Grid isn't ready yet. But ...
6
votes
1answer
5k views

HTML form using <table> or <div>

I read that, in HTML, it is better to display non-tabular data using the <div> tag instead of the <table> tag. I ...
3
votes
0answers
34 views

Responsive layout for showing/hiding 4 panels

I have 4 panels that will contains tables for data. There will be instances where a panel will contain no data, so I have combated wasted space with the code below. I'm relatively new to both jquery ...
3
votes
1answer
1k views

Android Authentication Activity with Fragments

I have an Activity called AuthActivity and I would like all of my authentication Fragments to be in this ...
1
vote
1answer
1k views

Login page without header/footer bars

I'm creating an app where the login page doesn't have the header/footer bars that the pages, after being logged in, would have. I've created an example that works, but I'm unsure if I am using the ...
6
votes
1answer
104 views

Positioning a container next to its menu

I'm a beginner in CSS and need help with a suggestion. I'm working on a project, in which I managed to position container_main right next to ...
4
votes
1answer
44 views

Everything you might want to know about an element

I am working with a lot of DOM manipulation and need to know several values of an element to determine its position within the DOM and I have written the following to help scrape several of the bits ...
4
votes
1answer
125 views

Responsive video embedding

I figured out a alternative way to make embedded videos responsive and I like to have some feedback on it. Would this be considered a hack or just bad coding to add a extra piece of html to make this ...
3
votes
0answers
3k views

A BaseActivity to render toolbar and navigation drawer

I'm new to Android programming and this is my first project so I'm not sure if this is the correct method of rendering the toolbar or the navigation of the drawer on the screen: So I have a ...
0
votes
1answer
35 views

File listing layout

I am designing a very basic file listing layout in HTML and CSS. Although its working but I would like to know if the following code could be improved upon so that its more good and follows the best ...
3
votes
0answers
549 views

Tablayout code for Android

I am using Tablayout for an Activity in my app but for some reason icons for each tab using ...
3
votes
1answer
100 views

HTML and CSS template of “Free .psd layout”

I have coded a free .psd layout for the first time. I did not make it responive because I would like to know if the code is correct. The layout's appearance in Firefox and Chrome seems to be ok (...
1
vote
1answer
189 views

CSS flexbox responsive grid system

I'm using the flexbox for the first time for a responsive grid system. It seems to be working as far as I tested but want to make sure it works on others too and see ways to improve this. Please see <...
1
vote
1answer
45 views

Product information overlaid on a large image

I've created some full-width divs containing images and text to exposure products. It did take a lot of trial and error (I do not have any kind of education). However, it feels a bit clumsy and i'm ...
7
votes
1answer
428 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
53 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
1answer
1k 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 ...
2
votes
2answers
51 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
73 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
1answer
246 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
116 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
2k 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
596 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
384 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
332 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
138 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
572 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
610 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
391 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 ...