0

i have a problem using css.

.ventabotones div{
    float:left;
    margin-right: 3%;
}

.ventabotones{
    overflow:hidden;
}
.ventabotones{
    height:80px;
    border: 1px solid;
    border-radius: 10px;
}

How could center horizontally #ventabotones content?

faisbu
  • 275
  • 1
  • 3
  • 18
  • 3
    Post your HTML please. – Lowkase Mar 21 '13 at 13:30
  • http://stackoverflow.com/questions/618097/how-do-you-easily-horizontally-center-a-div-using-css – Eric S Mar 21 '13 at 13:31
  • Your css says ventabotones is a class, while you say it's an id... Center aligning a div (or mostly the whole body in my case) I mostly do with `margin: 0 auto 0;` – Toon Casteele Mar 21 '13 at 13:32
  • I strongly recommend to use as little code blocks as necessary. So put `overflow: hidden` into the other `.ventabotones` block. – Raffael Mar 21 '13 at 13:33

2 Answers2

0

just add this to your css.

.ventabotones{
  text-align:center;
}

and if it still doesn't come in center, possible reasons

  • your container doesn't have enough width to show the content in center
  • some global CSS Class is overriding the local CSS Class

that's all that can be said without a glimpse of your html markup

Manish Mishra
  • 12,163
  • 5
  • 35
  • 59
0

use this code in css div you want to center on paginal

margin : 0 auto;