Solved

Button locations in html

Posted on 2013-11-02
5
194 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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…

912 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

20 Experts available now in Live!

Get 1:1 Help Now