aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes right justify buttons in all screen resolutions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "right justify buttons in all screen resolutions" Watch "right justify buttons in all screen resolutions" New topic
Author

right justify buttons in all screen resolutions

lina ajay
Ranch Hand

Joined: Apr 04, 2008
Posts: 31
Need to align buttons in HTMLto extreme right in all resolutions. it works in smaller resolutions but when tested in large resolutions the buttons look like they are right in the middle.Please advice. Code as of now

<td id="postButtons" editU" class="button" class="editBar" >  



</td>

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

had had similar results before. First to guarantee that it is the far right I use float:right. However, you have to make sure that it is not in a div or section that isn't to the far right. Basically I had float:right for my login buttons, but they were within a div, and that div was not set to float:right, so it ended up to the right of my description in the header, the header was set to 60% width, so to the right of that was near the middle and that div was only about 15%, so even though I had float:right for the button is was to 75%, so I made the parent div take up 40% and now my buttons are to the very right of all screen resolutions.

Hope that helps.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Two things:
  • As you have not shown us what you've already done, we cant really advise you on how it's wrong.
  • Having two class attributes on a single element is not valid. Apply multiple classes in a single attribute using space delimiters.


  • [Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
    lina ajay
    Ranch Hand

    Joined: Apr 04, 2008
    Posts: 31
    Mark Spritzler wrote: had had similar results before. First to guarantee that it is the far right I use float:right. However, you have to make sure that it is not in a div or section that isn't to the far right. Basically I had float:right for my login buttons, but they were within a div, and that div was not set to float:right, so it ended up to the right of my description in the header, the header was set to 60% width, so to the right of that was near the middle and that div was only about 15%, so even though I had float:right for the button is was to 75%, so I made the parent div take up 40% and now my buttons are to the very right of all screen resolutions.

    Hope that helps.

    Mark




    I used float and it works. Thanks
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: right justify buttons in all screen resolutions
     
    Similar Threads
    JSP Action Buttons freez after returning from ajax call
    Get the modified value from ArrayList of HashMap.
    Can not Populate the form on combo box change
    How to perform operations like insert,delete,add,move next etc in jsp page?
    document.forms[0].submit(); throws Invalid Argument in IE