I'm just trying to align this form to the left side but I can't. I've tried adding left-align to certain parts of the CSS but nothing. If you could also explain how I can align my form to the left for future reference.
Here's the JSFiddle: http://jsfiddle.net/7jW8y/5/embedded/result/
Here's the CSS:
.grid {
padding: 20px 20px 100x 20px;
max-width: 1300px;
margin: 0 auto;
list-style: none;
text-align: center;
}
.grid {
padding: 20px 20px 100px 20px;
max-width: 1300px;
list-style: none;
}
firstly, padding missing the p
in 100x
, should be 100px
second, no need margin: 0 auto
, it will make the ul center if margin-left & right is auto.
finally, (optional) no need text-align
in this layout.
Please try this:
.grid {
padding: 20px 20px 100x 20px;
max-width: 1300px;
margin: 0 auto;
list-style: none;
}
remove
margin:0 auto
and max-width:1300px
from .grid
class and add
width:930px
Check this fiddle > http://jsfiddle.net/7jW8y/9/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.