Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Adding two "buttons in the right top corner

Posted on 2013-11-06
7
Medium Priority
?
397 Views
Last Modified: 2013-11-06
I use jQuery and have these two buttons.

<a id="backToCaseStudyListButton" data-icon="back"  data-transition="slide" data-direction="reverse" rel="external">Testing</a>

Open in new window


and

						 <label for="options-menu" class="select"></label>
						 	<select name="options-menu" data-native-menu="false" id="options-menu"  data-theme="b" class="ui-btn-right" data-inline="true" data-icon="gear">
								<option value="None" id="options-menu-none">Options</option>
								<option value="reset" id="options-menu-reset">Reset to default</option>
								<option value="hide" id="options-menu-hide">Hide legend</option>					
							</select>

Open in new window


I want to put them after each other up in the right hand corner. How do I do that? When I do it like it is now, they end up on top of each other.

I looked here, but don't get it together:
http://stackoverflow.com/questions/5849173/multiple-buttons-on-right-hand-side-of-header
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
  • 4
  • 3
7 Comments
 
LVL 30

Expert Comment

by:Alexandre Simões
ID: 39627394
I use <ul> element to accomplish this.
See it in action here: http://jsfiddle.net/hjchZ/
HTML
<ul class="buttons-topright">
    <li><input type="button" value="button 1" /></li>
    <li><select><option>aksjdhajks</option></select></li>
    <li><input type="button" value="button 2" /></li>
</ul>

Open in new window

CSS
ul.buttons-topright{
    list-style-type: none;
    margin: 0;
    padding: 0;
    
    display: block;
    position: absolute;
    top: 0;
    right: 0;
}
ul.buttons-topright li {
    float: left;
}

Open in new window

you can have as many <li> as you want, and inside each one you can have whatever you want.
0
 

Author Comment

by:mdoland
ID: 39627430
Could you write that out exactly as it should be with my buttons and with what parameters left? I don't seem to get it to work.
0
 
LVL 30

Expert Comment

by:Alexandre Simões
ID: 39627459
I didn't write with your code because I couldn't see any buttons there...

Your fist code section, that you say it's 2 buttons, it's actually only a <a> element.
I guess there's something missing there...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mdoland
ID: 39627473
Ok, I think you are right. It looks like a button on the screen though. Is it possible to treat it like a button and make it stay up in the right corner with the other button??
0
 
LVL 30

Accepted Solution

by:
Alexandre Simões earned 1500 total points
ID: 39627494
So the list for your code should be:
<ul class="buttons-topright">
    <li><a id="backToCaseStudyListButton" data-icon="back" data-transition="slide" data-direction="reverse" rel="external">Testing</a>
    </li>
    <li>
        <label for="options-menu" class="select"></label>
        <select name="options-menu" data-native-menu="false" id="options-menu" data-theme="b" class="ui-btn-right" data-inline="true" data-icon="gear">
            <option value="None" id="options-menu-none">Options</option>
            <option value="reset" id="options-menu-reset">Reset to default</option>
            <option value="hide" id="options-menu-hide">Hide legend</option>
        </select>
    </li>
</ul>

Open in new window


Like I told you, you need to add a <li> in the list per item and add the content there.

And don't forget the CSS
0
 

Author Closing Comment

by:mdoland
ID: 39627654
Well, didn't really get it to work in this way, but solved it in another way.
0
 
LVL 30

Expert Comment

by:Alexandre Simões
ID: 39627663
I don't know how you did it but for these kind of things, using ul / li lists is the best option.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

610 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