Solved

Adding two "buttons in the right top corner

Posted on 2013-11-06
7
395 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
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 

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 500 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article discusses how to implement server side field validation and display customized error messages to the client.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

729 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