Solved

Button locations in html

Posted on 2013-11-02
5
195 Views
Last Modified: 2013-11-04
I have an image that I want to use as button image. I want to be able to define an area where the buttons shall be located. How can I set limits for where the buttons will be located?


I want to have the buttons in two rows and I don't know how many buttons there will be at a certain time since they are created dynamically.
0
Comment
Question by:mdoland
  • 3
  • 2
5 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39618755
A link to the page would help.  what do you mean by: How can I set limits for where the buttons will be located?

Cd&
0
 

Author Comment

by:mdoland
ID: 39621180
I don't have a link.

I have a web-page containing a header. Directly under there I want to have two rows with buttons like this:

---------------
1 3 5 7 9
2 4 6 8 10
---------------

How do I control in a nice way where they end up? When I put them out with position:absolute, it looked very ugly when I shrinked and grow the browser since the resten moved away accordingly.
0
 

Author Comment

by:mdoland
ID: 39621732
One idea could be to use flexbox. I have tried that but without success. The plan then was to group the images two and two, putting columns (of two images) beside other columns.

How do I do that?
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39622328
Flexbox is very thinly support and not yet reliable.

Just float the buttons left and they will line up and adjust when the browser width is changed.

I can't really do much with coding without seeing the page, and seeing what you are actually building.

Cd&
0
 

Author Comment

by:mdoland
ID: 39623361
Float left was almost perfect! Great!
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question