Believe it or not, something like this will do:
1 2 3 4 5 6 7 |
.element { left:0; right:0; position: absolute; width: 100%; //would be nice, also } |
You can also center the content using text-align. Now as for width, some say that it is required, but in many cases I didn’t see any difference (I guess this is dependent on the browser). And you’re encouraged to add max-width combined with width:100% values.