CSS punch to the face

Today’s lesson:

When using absolute positioning (position:absolute;) for an element within a container div the the container must have a relative position (position: relative;) in order for the absolutely positioned element to be correctly positioned with said container.

….And it only too me 48 hours to learn that.   I could make that clearer, and even include an example, but f**k you guys.

Advertisements

One thought on “CSS punch to the face

  1. to be totally precise the position of the containing box should be other than default (static) other wise the contained box will use the first outer other than default positioned box.. usually the html element 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s