Solved

Adding two "buttons in the right top corner

Posted on 2013-11-06
7
394 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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

Suggested Solutions

Title # Comments Views Activity
Video Tutorial help 2 40
CSS - Centering an image 2 27
Echo'd values in dropdowns 6 30
disable open new tab with right mouse click in <a> tag 3 19
This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

726 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