Welcome to WebDesignForums.net!
You're currently viewing WDF as a guest. By registering for a free account, you'll be able to participate with other members in our friendly community. Being a member allows you to ask questions and get answers for those troublesome web development tasks!

In addition, as a member you'll be able to post your websites up for review. Using our unique website review system you can gain some amazing feedback from some of the best web developers around. This is a completely free service to all registered members.

Ready to register yet? Registration is 100% free. Click Here To Join Now!

Enlarge on mouseover pushes other images out the way

Discussion in 'Javascript, AJAX, and JSON' started by RoonyHD, Nov 26, 2011.

  1. Offline

    RoonyHD New Member

    Message Count:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Hello there ^^

    I've got this small website I'm doing that requires me to generate the website in Photoshop, use the slice tool to export it to HTML and then code an extrenal Javascript file to have rollovers and such which I've already done.

    Although when I rollover a menu button, it expands like it should but pushes all the other images out of the way.

    [IMG]

    Heres a copy of the javascript code I used.
    http://pastebin.com/S3WGdJyV

    If anyone can help that would be greatly appreciated :3


  2. Offline

    Ronald Roe Well-Known Member

    Message Count:
    1,121
    Likes Received:
    281
    Trophy Points:
    83
    Gender:
    Male
    Location:
    Oklahoma City/Norman/Midwest City
    Your problem has to do with slicing in Photoshop and using that code. Photoshop's code isn't the least bit flexible. Everything is absolute, and depending on what options you chose, may be written completely in tables. On top of that, the entire page is a bunch of little images. You'd do better to wrap that nav in a div and float it left, and wrap the content in a div and float that right. That way, when you expand the menu items, it will only push the other menu items down. And, if you get rid of the many little images and replace them with background color, everything will be seamless.


  3. Offline

    RoonyHD New Member

    Message Count:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Hi Ronald,

    Thanks for the response but I'm not too good on the lingo...
    What would the code be for wrapping an image in a div and floating it left?

    Thanks


  4. Offline

    RoonyHD New Member

    Message Count:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Alrighty I managed to cut down the amount of images and using HTML and CSS its turned out quite nicely :D
    Thanks for the advice Ronald


Share This Page