0

I have a link and a button, each in their own div, and then wrapped in a shared div. The link is centered on the page, and the button is aligned to the right side of the page. I want to keep this, but have the two items on the same line. How can I do this?layout of buttons

devlin carnate
  • 8,309
  • 7
  • 48
  • 82

1 Answers1

0

Use floats on your divs, something like this:

<div class="wrapper">
    <div class="center">
        center
    </div>
    <div class="right">
       right
    </div>
</div>

and for css:

.wrapper {
     width: 100%;
}

.center {
    float: left;
    margin-left: 50%;
}

.right {
    float: right;
}

http://jsfiddle.net/uK5hM/

Wietse
  • 372
  • 7
  • 18
  • Doesn't that align the left side of the center text to the center of the screen? I think OP wants the center of the center text to be in the center. – fred02138 Oct 08 '13 at 15:52
  • Agreed... was just hoping to get him on track since there is a lack of code and/or more information. – Wietse Oct 08 '13 at 15:55