Results 1 to 2 of 2

Thread: Resizing images to reflect the size of tabs in a fluid layout

  1. #1
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default Resizing images to reflect the size of tabs in a fluid layout

    I have five tabs at the top of my website: one for the main site, one for a blog, one for a Twitter feed, one for a Facebook page, and one for a YouTube profile.

    I am trying to make these tabs display images, and these images should resize when the tab is narrower than the image, but stay the original size when the tab is wider, so as to avoid the tabs protruding from the tabs.

    I wrote a JavaScript (that doesn't work), and set the image widths to 100% of the container width as a fallback. Since the JavaScript doesn't work, it goes to the fallback, but some of the images stick out from the bottom of the tabs, as the height of the image at the tab's width is greater than the tab's height.

    The code is too complex to post here, but you can see the problem live: http://wooftalk.net/fmnas

    If anyone has any ideas how to make that JavaScript work, that would be great!
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  2. #2
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    Bump.
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •