Film Strip Rollover Effect

This is a discussion on "Film Strip Rollover Effect" within the Web Page Design section. This forum, and the thread "Film Strip Rollover Effect are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 3rd, 2006, 07:49
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Film Strip Rollover Effect

Ok heres what im thinking of doing.

1) in my #divleft i will nest 3 new #divbutton's (eg)

2) each of these #divbuttons will be set to a specific size.

3) an immage that is the same width but 2 x as tall will be inserted into each #div, the top half of the immage will have the "normal" state of the button & the bottom half will have the "hover" state.


I know this can be done... cos i think i remember geoff or moojoo mentioning it to me in one of my threads ages ago.

Basically how do i go about making sure the right portion of the immage is displayed at the relevant time?


**** the only other way i can think orf doing this is to swap the background of the div on rollover ....... but i cant think how that would work.

thanks for any input guys
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 3rd, 2006, 09:07
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Film Strip Rollover Effect

Whatever the size of a graphic a div will only show you as much as can fit within its specified width and height.

With that in mind, you produce the effect you are looking for by controlling the vertical offset of the image in your css code.

So for example:
Code: Select all
.normal {
   position: relative;
   top: 0;
}

The above would be the default anyway but I include it here for clarity.

.rollover {
   position: relative;
   top: 25px;
}
This assumes 50px high graphic and a button height of 25px;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 3rd, 2006, 09:20
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Film Strip Rollover Effect

do i control this using #divbutton a:link & #divbutton a:hover ???

Or does it require other css identifyers?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 3rd, 2006, 15:45
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Film Strip Rollover Effect

That should do the business.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 4th, 2006, 01:02
frinkky's Avatar
Super Moderator
Join Date: Oct 2006
Location: Southampton
Age: 30
Posts: 351
Blog Entries: 2
Thanks: 2
Thanked 6 Times in 6 Posts
Re: Film Strip Rollover Effect

Dunno if this will help you - and i'm sure it can be simplified greatly - but heres how i've done it on my current project, it just works in the y-axis rahter than the x:

xhtml:

<div id="sidebar">
<ul id="navlist">
<li id="active1"><a href="
http://www.granarydining.co.uk" id="current1"></a></li>
</ul>
<ul id="navlist1">
<li id="active2"><a href="
http://www.granarydining.co.uk/about.htm" id="current2"></a></li>
</ul>
<ul id="navlist2">
<li id="active3"><a href="
http://www.granarydining.co.uk/contact.htm" id="current3"></a></li>
</ul>
<ul id="navlist3">
<li id="active4"><a href="
http://www.granarydining.co.uk/specials.htm" id="current4"></a></li>
</ul>
<ul id="navlist4">
<li id="active5"><a href="
http://www.granarydining.co.uk/menu.htm" id="current5"></a></li>
</ul>
<ul id="navlist5">
<li id="active6"><a href="
http://www.granarydining.co.uk/events.htm" id="current6"></a></li>
</ul>
<ul id="navlist6">
<li id="active7"><a href="
http://www.granarydining.co.uk/meetingrooms.htm" id="current7"></a></li>
</ul>
<ul id="navlist7">
<li id="active8"><a href="
http://www.granarymeetingrooms.co.uk/wherearewe.htm" id="current8"></a></li>
</ul>
</div>


And the CSS:

#navlist, #navlist1, #navlist2, #navlist3, #navlist4, #navlist5, #navlist6, #navlist7 {
margin: 0px;
Padding:0px;
list-style-type: none;
}
#navlist a, #navlist a:visited {
display: block;
width: 148px;
height: 24px;
background-image: url(../images/home.jpg);
background-repeat: no-repeat;
background-position: 0% 0%;
text-decoration: none;
}
#navlist a:hover {
background-image: url(../images/home.jpg);
background-repeat: no-repeat;
background-position: 100% 0%;
}
#navlist1 a, #navlist1 a:visited {
display: block;
width: 148px;
height: 24px;
background-image: url(../images/about.jpg);
background-repeat: no-repeat;
background-position: 0% 0%;
text-decoration: none;
}
#navlist1 a:hover {
background-image: url(../images/about.jpg);
background-repeat: no-repeat;
background-position: 100% 0%;
}
#navlist2 a, #navlist2 a:visited {
display: block;
width: 148px;
height: 24px;
background-image: url(../images/contact.jpg);
background-repeat: no-repeat;
background-position: 0% 0%;
text-decoration: none;
}
#navlist2 a:hover {
background-image: url(../images/contact.jpg);
background-repeat: no-repeat;
background-position: 100% 0%;
}
#navlist3 a, #navlist3 a:visited {
display: block;
width: 148px;
height: 24px;
background-image: url(../images/specials.jpg);
background-repeat: no-repeat;
background-position: 0% 0%;
text-decoration: none;
}
#navlist3 a:hover {
background-image: url(../images/specials.jpg);
background-repeat: no-repeat;
background-position: 100% 0%;
}
#navlist4 a, #navlist4 a:visited {
display: block;
width: 148px;
height: 24px;
background-image: url(../images/menu.jpg);
background-repeat: no-repeat;
background-position: 0% 0%;
text-decoration: none;
}
#navlist4 a:hover {
background-image: url(../images/menu.jpg);
background-repeat: no-repeat;
background-position: 100% 0%;
}
#navlist5 a, #navlist5 a:visited {
display: block;
width: 148px;
height: 24px;
background-image: url(../images/events.jpg);
background-repeat: no-repeat;
background-position: 0% 0%;
text-decoration: none;
}
#navlist5 a:hover {
background-image: url(../images/events.jpg);
background-repeat: no-repeat;
background-position: 100% 0%;
}
#navlist6 a, #navlist6 a:visited {
display: block;
width: 148px;
height: 24px;
background-image: url(../images/meetings.jpg);
background-repeat: no-repeat;
background-position: 0% 0%;
text-decoration: none;
}
#navlist6 a:hover {
background-image: url(../images/meetings.jpg);
background-repeat: no-repeat;
background-position: 100% 0%;
}
#navlist7 a, #navlist7 a:visited {
display: block;
width: 148px;
height: 24px;
background-image: url(../images/where.jpg);
background-repeat: no-repeat;
background-position: 0% 0%;
text-decoration: none;
}
#navlist7 a:hover {
background-image: url(../images/where.jpg);
background-repeat: no-repeat;
background-position: 100% 0%;
}
Last Blog Entry: Fobriwap! (Mar 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Nov 6th, 2006, 08:14
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Film Strip Rollover Effect

That does help actually thanks..... given me a few ideas
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Nov 6th, 2006, 10:17
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Film Strip Rollover Effect

Just need to ask this quickly.

How do i make it so that the background immage is a clickable link??

Also, is it best to use <ul>..</ul> or, can i do this just with nested div tags??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Nov 6th, 2006, 12:54
frinkky's Avatar
Super Moderator
Join Date: Oct 2006
Location: Southampton
Age: 30
Posts: 351
Blog Entries: 2
Thanks: 2
Thanked 6 Times in 6 Posts
Re: Film Strip Rollover Effect

I believe the 'hotspot' is defined by the highlighted code which provides the size of the visible button (i've changed my nav bar to text and one background image, rather than the separate images for each button as before):

#navlist a, #navlist1 a, #navlist2 a, #navlist3 a, #navlist4 a, #navlist5 a, #navlist6 a, #navlist7 a, #navlist8 a, #navlist9 a, #navlist10 a, #navlist a:visited, #navlist1 a:visited, #navlist2 a:visited, #navlist3 a:visited, #navlist4 a:visited, #navlist5 a:visited, #navlist6 a:visited, #navlist7 a:visited, #navlist8 a:visited, #navlist9 a:visited, #navlist10 a:visited {
color:#F8D3D3;
display: block;
width: 148px;
height: 30px;
background-image: url(../images/btnbck.jpg);
background-repeat: no-repeat;
text-decoration: none;
}


As for using nested div's I think the ul, li method is preferred as it automatically defines the links as a vertical list, so if you're doing a horizontal nav bar it could be equally simple to use nested div's - but to be truthfull i don't really know for sure. Perhaps someone in the know could let us both know
#navlist a:hover, #navlist1 a:hover, #navlist2 a:hover, #navlist3 a:hover, #navlist4 a:hover, #navlist5 a:hover, #navlist6 a:hover, #navlist7 a:hover, #navlist8 a:hover, #navlist9 a:hover, #navlist10 a:hover {
color:#FFFFFF;
background-image: url(../images/btnbck.jpg);
background-repeat: no-repeat;
}
Last Blog Entry: Fobriwap! (Mar 10th, 2008)

Last edited by frinkky; Nov 6th, 2006 at 12:58.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Nov 6th, 2006, 14:58
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: Film Strip Rollover Effect

doing the entire menu with list elements would be the better approach.

then you can style ul's li's, ul li ul's and ul li ul li etc etc....
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Nov 6th, 2006, 15:13
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Film Strip Rollover Effect

Quote:
Originally Posted by moojoo View Post
doing the entire menu with list elements would be the better approach.

then you can style ul's li's, ul li ul's and ul li ul li etc etc....
my main navigation system is exactly that moojoo.

This is just 3 buttons on each page linking to some php forms .... i just didnt want javascript or loads of gifs on my site... but also wanted these buttons to stand out a bit and not just be plain text.

it works perfectly now .... thanks guys
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
div

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Judge my Film website Please :) philipd Free Web Site Critique 15 Jun 23rd, 2008 20:14
CSS Ordered List (Rollover Effect) Problem in I.E 6 Aaron1988 Web Page Design 0 Mar 10th, 2008 03:56
Window Film Factory edski Free Web Site Critique 2 Jun 14th, 2007 12:48
rollover effect. origional image not appearing WeirdClayJisKOOL Web Page Design 4 Mar 3rd, 2007 13:59
Film Student Searching for help chinoxl Job Opportunities 4 Dec 20th, 2005 17:15


All times are GMT. The time now is 15:46.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42