We help IT Professionals succeed at work.

Scaling absolute element in the center

catonthecouchproductions
on
Medium Priority
213 Views
Last Modified: 2012-05-12
I am working on this page: http://goo.gl/p4FRu - if you click Engage you will see a nav appear,
with the Blaze logo in the center.

 If you shrink the browser window you will see it doesnt stay centered, what can I do to make that center? Remove the absolute positioning?

Thanks,

Ryan
Comment
Watch Question

Top Expert 2013
Commented:
You are absolut positioning in %.  The browser converts that to pixels based on the current dimensions.  When the widow is re-sized the new values detroy the previous spacial relationship.  Using pixels won't help the relationships will not hold up.  

Your best option is to make the pieces part of a single image.  The only other way is going to be scripting with a bunch od arithmetic and detailed fine tuning to keep it together under all conditions.
Hey,

Thanks. I think thats the best bet or just size to a minimal resolution. Don't want too much code relaying on that small part.

Thank you,

Ryan

Explore More ContentExplore courses, solutions, and other research materials related to this topic.