Hot answers tagged

34 votes
Accepted

HTML page listing product characteristics

HTML has elements that carry semantics. For example ol is an ordered list, ul an unordered one. Programs can use that meaning ...
Zeta's user avatar
  • 19.2k
9 votes

HTML page listing product characteristics

To go further on Zeta's answer, you may nest ordered lists. Something like this: ...
dg3's user avatar
  • 191
6 votes
Accepted

HTML form using <table> or <div>

Specification In the HTML specifications you can find the following: The HTML table model allows authors to arrange data -- text, preformatted text, images, links, forms, form fields, other tables,...
insertusernamehere's user avatar
5 votes
Accepted

HTML and CSS template of "Free .psd layout"

First of all, your HTML looks very clean and it seems that you don't use more elements then needed to achieve what you want. This is a very good thing. Social media links All links like ...
insertusernamehere's user avatar
5 votes
Accepted

Position logo in middle of nav

If you're going to use flex, use flex! Flex inherently helps with margin control. Margins are great, but you're essentially saying, I want to learn flex, except when it's easier/convenient to go back ...
soulshined's user avatar
5 votes
Accepted

Splitting a long string based on its graphical presentation

General remarks Here are some general remarks that could make your code look a little cleaner : Avoid using ; at the end of an instruction unless you have to put ...
ielyamani's user avatar
  • 869
4 votes

Rearrange page numbers for printing a book

Style Your code is not too far from following PEP8 and you know PEP8: it would have been a nice touch for volunteer reviewers to provide a piece of code even closer to what they expect. You'll find ...
SylvainD's user avatar
  • 29.2k
4 votes

HTML page listing product characteristics

or may i add css class for those lines instead of <br> tags to give space between lines? No. Designing a CSS class only to replace an other HTML element ...
Billal Begueradj's user avatar
4 votes

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

Keep it simple Your algorithm is too complex, with too many iterations and uses too much memory. It can be simplified using only a single outer iteration to get a row, and the row's max height. Then ...
Blindman67's user avatar
  • 21.6k
3 votes
Accepted

Function to determine the appropriate dimensions for a close button

First, a few general notes about types. Don't use String and Boolean. Use string and ...
Gerrit0's user avatar
  • 3,456
3 votes

Better way for many components?

Because the class is sealed, your IDisposable implementation is over-complicated. The whole entire point of the ...
Mathieu Guindon's user avatar
3 votes

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

I think you are over-engineering here. OOP is not an end in itself, so don't convert your code to "OOP style" just because. The most desirable property of code (after correctness) is clarity. Clarity ...
Tomalak's user avatar
  • 266
3 votes

Swing Component Resizer Class

Just going through this from top to bottom: /* * A class for resizing Swing components within a container * to maintain aspect ratio with the container. */ I'...
Vogel612's user avatar
  • 25.2k
3 votes

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

I like your implementation. It's simple and clear. I would replace the setting of the row height using a bit more functional style, eliminating the local height ...
janos's user avatar
  • 111k
3 votes
Accepted

Randomly place Divs on webpage and make sure they don't overlap

Style Some styling points Names. You have some poor naming The JavaScript naming convention is camelCase avoid using snake_case...
Blindman67's user avatar
  • 21.6k
2 votes

Ruby OOP convention/layout

@Borsunho made some points on functional improvements, so I'll address some style points. File.exist?("#{$folder_name}") - Folder name is already a string, so you ...
Devon Parsons's user avatar
2 votes

Ruby OOP convention/layout

I started to write a detailed review, but in middle of it I realised that best advise I could give you looking at this code is to pick up some good Ruby book and work through it carefully, paying ...
Borsunho's user avatar
  • 897
2 votes

Android Authentication Activity with Fragments

Well, since there is hardly any Java code to review I'll review your xml code. It is good practice to combine attributes that your layouts/views have in common in your /res/values/styles.xml file. F....
A Honey Bustard's user avatar
2 votes

Login page without header/footer bars

First of all, try to write code for pure components without using a class: It will be your App.js ...
ASA's user avatar
  • 21
2 votes

Everything you might want to know about an element

I have written the following to help scrape several of the bits of information I need to proceed. If this is for development purposes, for gathering information about an element and not actually ...
Joseph's user avatar
  • 25k
2 votes
Accepted

Button-clicking UI for a game

I haven't worked with Java in a long time, so I can't say much about language-specific issues or whether your use of AWT makes sense. But here is what I can say: Constants You've got several '...
Pieter Witvoet's user avatar
2 votes

RTL management HTML & CSS

I found a case where the solution #3 doesn't work : when you're dealing with scroll bars. In your example, if you put a container smaller than the content, the scrollbar behave strangely in RTL, ...
Thomas Ferro's user avatar
2 votes

Large poster with positioning elements

Your use of all caps ("NUTRIENTS", "FAT" etc.) seems to be decorative. In that case, you should use CSS instead: text-transform: uppercase; You should not skip ...
unor's user avatar
  • 2,593
2 votes
Accepted

Grid of radio buttons in Android

In your layout XML file, keep the checked value of all RadioButton to false. ...
SaadAAkash's user avatar
2 votes

Grid layout component for VueJS

Never heard of Atomic design till today.Read the blog and a few chapters of the book. Nothing really new, just another analogy (re-branding) for the standard modular design methods. To your code. ...
Blindman67's user avatar
  • 21.6k
2 votes

Text centered in a circular component

Try this approach. It uses CSS Grid layout. It requires less code and is easier to maintain. ...
Pi314's user avatar
  • 41
1 vote

Layout for a Tkinter form

Frames are specifically designed to be a tool in organizing the widgets in your GUI. In the case of a simple form like this, I recommend using one frame for the labels and entries, and one for the ...
Bryan Oakley's user avatar
  • 2,091
1 vote

Plotting text from a dictionary with Matplotlib

Your code might be a bit clearer without level & start, preferring to manipulate just x & y. You might write a sorting helper function, and change the emoj ...
J_H's user avatar
  • 16.7k
1 vote

onResize and onLoad handlers to toggle mobile layout

Your code is mainly about this test: if (window.innerWidth >= MIN_WIDTH_BREAKPOINT) You shouldn't be doing this using JavaScript to do this at all. Width-...
200_success's user avatar
1 vote

RTL management HTML & CSS

Personally I feel #3 is the worst choice. I can only imagine all the things that can go wrong there. At the very least I would mirror the page (...
RoToRa's user avatar
  • 10.9k

Only top scored, non community-wiki answers of a minimum length are eligible