File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

right justify buttons in all screen resolutions

 
lina ajay
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64186
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  •  
    lina ajay
    Ranch Hand
    Posts: 31
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic