Reputation: 1
Imagine social media icons/images (e.g. Facebook, Twitter, LinkedIn) lined up next to each other on the same line. How can I make the size of the icons/images auto adjust when I add additional icons/images to that line? Right now they just jump to the next line. I want it to where, if I add icons/images, they get smaller, so as to stay on the same line; if I take icons/images away, they get larger to fit the width of the container.
Thank you for your help!
Update:
<div class="padding"><a href="http://www.facebook.com"><img class="image" src="images/black_white_facebook.png" alt="Facebook Icon" /></a></div>
<div class="padding"><a href="http://www.twitter.com"><img class="image" src="images/black_white_twitter.png" alt="Twitter Icon" /></a></div>
<div class="padding"><a href="http://www.linkedin.com"><img class="image" src="images/black_white_linkedin.png" alt="Linked In Icon" /></a></div>
<div class="padding"><a href="http://www.wordpress.com"><img class="image" src="images/black_white_wordpress.png" alt="WordPress Icon" /></a></div>
<div class="padding"><a href="http://www.youtube.com"><img class="image" src="images/black_white_youtube.png" alt="YouTube Icon" /></a></div>
<div class="padding"><a href="http://www.plus.google.com"><img class="image" src="images/black_white_google_plus.png" alt="Google+ Icon" /></a></div>
</div><!-- end of icons div -->
.image {width: 150px; background-color: white; padding: 2px;}
.padding {display: inline; padding-right: 6px;}
Upvotes: 0
Views: 338
Reputation: 1469
I think you should put each content: text, icon in different and put these in a line with width and height as you want
Upvotes: 0