Log in

View Full Version : How can I align something to match screen resolution?



mathewonsu
11-06-2009, 10:57 AM
I want to align something with the edges of the screen.
So if I had a box(example), and I had a wide screen, the box would stretch to the left and right edges of the screen.
I think that's basically all the info you need...
Help appreciated!

jscheuer1
11-06-2009, 03:29 PM
Give it a css style width of 100%. If that doesn't work, it must be block level or an image (div, p, etc. or img), and cannot have a parent element whose width is set and set to less than 100%. Most block level elements will by default expand to 100% of the width available to them. Images must have their width explicitly set to 100% for this, but that can distort the image.