troubleshooting Question

Button Won't Center

Avatar of David Schure
David Schure asked on
CSSHTML
4 Comments1 Solution23 ViewsLast Modified:
Trying center a button that is in a div.  It is positioned at the bottom of the div.

It's the send button.
The CSS
.chat_window{
/*height:550px;
width:20%;
float:left;
background:red;
postion:absolute;*/
background-color: #c2eafb;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  -khtml-border-radius: 5px;
  border-radius: 5px;
  height: 500px;
  width: 20%;
  z-index: 9999;
  margin-top: 10px;
  margin-left: 10px;
  position: absolute;
  top:0;
  left:0;
}

Open in new window


.send_me {
   margin: 0 auto;
    padding: 5px 5px 5px 5px;
     position: absolute;
     bottom: 0px;
}

Open in new window

The HTML
<div class="chat_window">
        <div class="chat_title">CHAT WINDOW</div>
        <div class="send_me"><button type="submit" class="btn3" name="submit">Send</button></div>
        </div>

Open in new window

Tried this.  It moved but not to the center.
.send_me {
   right: 50%;
    padding: 5px 5px 5px 5px;
     position: absolute;
     bottom: 0px;
}

Open in new window

ASKER CERTIFIED SOLUTION
Anwar Saiah

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros