Solved

Button locations in html

Posted on 2013-11-02
5
200 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

717 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