tags:

views:

51

answers:

4

page I'm working with: http://jsbin.com/abewe4

I want the slogan div centered inside col3 div

I'm using

width: 50%; 
margin: auto;

on the inner div but still it is not working.

+2  A: 

You need to add ‘text-align: center‘ to col3.

Moshe
that does not seem to work. tried w/ firebug
samwick
+1  A: 
.slogan {
color:#143063;
font-size:18px;
**line-height:92px;** //Add this line without the asterisks(*)
margin:auto;
text-align:center;
width:50%;
}
samer
that works thanks
samwick
Samwick a you should accept this as the answer then. You have a 60% accept ratio. Not horrible, but...
Moshe
I'm getting better mate. at the time of the comment I tried to accept the answer but jeff's logic said I still had to wait X minutes. So I went and took the trash out
samwick
A: 

I see that you have a div called col3 and a nested div classed slogan. Here is how I would do it.

#col3 {
   width: 100%;
   text-align: center;
}
.slogan {
   width: 600px;
   margin: 0px auto;
   text-align: left;
}

slogan should have a fixed width for the margin: 0px auto to center it.

aip.cd.aish
A: 

.classname{ width:800px; margin:0px auto; }

It may center to main div, here are different ways to center div http://www.templatespoint.com/blog/2009/06/how-to-center-main-div/

Eswar