Before someone casts my vote, I posed another centering problem. Please read my situation before judging!
I am familiar with the most common methods of centering the material, but here is my situation. I have a DIV that should be both vertically and horizontally centered inside its parent, but it should also be fluid and not exceed a width of 890 pixels.
The maximum width reaches the required fluid, but since absolute positioned elements require a width rather than a maximum width, my vertical / horizontal centering breaks. Right now I have to sacrifice fluid over centering (or vice versa), but I'm NEED .
I would like to constantly keep the content in my DIV center, my current code does not do this, it hides the content when the window becomes smaller http://jsfiddle.net/cCQ2w/
Can anyone suggest a solution that might work for me?
source
share