Solved

Button locations in html

Posted on 2013-11-02
5
192 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Float left was almost perfect! Great!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now