?
Solved

Adding two "buttons in the right top corner

Posted on 2013-11-06
7
Medium Priority
?
396 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
WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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 an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

764 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