Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Dynamic width of absolutely positioned div

Dynamic width of absolutely positioned div

Problem

So i'm having this:

  

an Absolutely Positioned button bar

What I want: If the user resizes the window and makes it smaller than 500px, the buttons should get closer together instead of adding a scrollbar. Is this somehow possible?

Problem courtesy of: Toskan

Solution

EDIT:

there is a solution!

width: 70%;
max-width: 500px;

This will make your bar adjust to the window Width, but never exceed 500px. (optionally, add a min-width also)

Solution courtesy of: Rodik

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

Dynamic width of absolutely positioned div

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×