Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Increase Banner Advert height onmouseover

  • 07-09-2006 8:55am
    #1
    Moderators, Politics Moderators Posts: 41,224 Mod ✭✭✭✭


    Simple Q but Im too tired to think straight.
    Although imposing a size rule of 468*60, one of my advertisers wants his advert which is 468*120.
    What I want is to effectively hide the bottom 60 pixels of the advert until a mouse moves over the advert and then the whole lot is revealed.
    I presume this is possibe with DIVs and its z-index.
    However, if the DIV is inside a table cell will it always stay in the same place or will it increase the height of the table?
    Is there any example code snippets out there?


Comments

  • Closed Accounts Posts: 1,200 ✭✭✭louie


    that should do it
    <style type="text/css">
    .named_div_small{width:460px; height:60px; border:1px solid #000;}
    .named_div {width:460px; height:120px; border:1px solid #000;}
    </style>
    
    
    <div class="named_div_small" onmouseover="this.className='named_div'" onmouseout="this.className='named_div_small'">
    some text ord banner here
    </div>
    


  • Moderators, Politics Moderators Posts: 41,224 Mod ✭✭✭✭Seth Brundle


    Thanks.
    Unfortunatley, the image still appears in full all the time :(


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    set the image as background of the div itself.
    <style type="text/css">
    .named_div_small{width:460px; height:60px; border:1px solid #000; background-image:"path to the image"; background-repeat:no-repeat;}
    .named_div {width:460px; height:120px; border:1px solid #000;background-image:"path to the image"; background-repeat:no-repeat;}
    </style>
    


  • Moderators, Politics Moderators Posts: 41,224 Mod ✭✭✭✭Seth Brundle


    thanks louie.
    the css BG property needs changing to
    background-image:url('path to the image')
    However, the DIV 'jumps' when it increases - the way the page is designed means that it moves upwards. Using z-index means that the div needs to have an absolute position which i guess doesn't suit.
    What I want is something like the advert at the top of this page dropping down so that it covers whatever is behind it (with this page it would be the 'welcome NNN' bit)


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    You will be better off looking at a floatting div which will have no effect on the page whatsoever, or iFrame


  • Advertisement
  • Moderators, Politics Moderators Posts: 41,224 Mod ✭✭✭✭Seth Brundle


    Yeah - that was in the back of my mind.
    I'll probably just tell them to adjust the pic to 468*60
    Thanks for all the help.


Advertisement