inline lists and rollovers

This is a discussion on "inline lists and rollovers" within the Web Page Design section. This forum, and the thread "inline lists and rollovers are both part of the Design Your Website category.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 28th, 2007, 12:30
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
inline lists and rollovers

i ave an inline list that im using ofr navigation.... and i want to add a nice rollover effect.

I want the links to appear horizontally in "box's" 90x30 px 's, with the background image giving the effect of the box.

Then ill move the background image up or down on rollover to get my effect.

Sounds easy?

I wish .... the problem is that i cant seem to find a way to specify the dimensions of the links.... so not all of my background image shows, i can manage it with padding... but then the links are all different sizes depending on the ammount of text.

is there anyway of doing this?

please ??
Reply With Quote

  #2 (permalink)  
Old Mar 28th, 2007, 13:01
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: inline lists and rollovers

its ok i got it
Reply With Quote
  #3 (permalink)  
Old Mar 28th, 2007, 13:12
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: inline lists and rollovers

Oh yeah? how d'you do it!
Reply With Quote
  #4 (permalink)  
Old Mar 28th, 2007, 13:22
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: inline lists and rollovers

errm... hang on :P

ok....

1) put your entire list in a div ... and float it left, then pad it out to the position you want the list to appear.

use the following css:

Code: Select all
#ulnav li {
    display: inline;
    list-style-type: none;
    text-align: center;
    float: left;
    width: 90px;
    padding-top: 10px;
}
#ulnav a:link, #ulnav a:visited, #ulnav a:active {
    color: #FF0000;
    font-size: 15px;
    font-family: Garamond;
    display: block;
    background-repeat: no-repeat;
    text-decoration: none;
    overflow: auto;
    background-image: url(../image/nav%20roll.png);
    width: 90px;
    height: 30px;
    background-position: center top;
}
#ulnav a:hover,#ulnav a.current:link,#ulnav a.current:visited {
    background-position: center bottom;
    background-image: url(../image/nav%20roll.png);
    background-repeat: no-repeat;
    background-position: center -30px;
}
Basically you set the li element to display as inline .... and the a. elements to display as block.

Clever eh?
Reply With Quote
  #5 (permalink)  
Old Mar 28th, 2007, 13:28
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: inline lists and rollovers

Cool

Or, you can do this ...
Code: Select all
#ulnav li {
    display: inline;
    list-style-type: none;
    text-align: center;
    float: left;
    width: 90px;
    padding-top: 10px;
}

#ulnav a:link, #ulnav a:visited, #ulnav a:active {
    color: #FF0000;
    font-size: 15px;
    font-family: Garamond;
    display: block;
    text-decoration: none;
    overflow: auto;
    background: url(../image/nav%20roll.png) no-repeat 50% 0;
    width: 90px;
    height: 30px;
}

#ulnav a:hover,#ulnav a.current:link,#ulnav a.current:visited {
    background: url(../image/nav%20roll.png) no-repeat 50% -30px;
}
or this

Code: Select all
#ulnav li {
    display: inline;
    list-style-type: none;
    text-align: center;
    float: left;
    width: 90px;
    padding-top: 10px;
}

 #ulnav a:link, #ulnav a:visited, #ulnav a:active, #ulnav a:hover,#ulnav a.current:link,#ulnav a.current:visited {
    background-image: url(../image/nav%20roll.png);
    background-repeat: no-repeat;
}

#ulnav a:link, #ulnav a:visited, #ulnav a:active {
    color: #FF0000;
    font-size: 15px;
    font-family: Garamond;
    display: block;
    text-decoration: none;
    overflow: auto;    
    width: 90px;
    height: 30px;
    background-position: 50% 0;
}

#ulnav a:hover,#ulnav a.current:link,#ulnav a.current:visited {
    background-position: 50% -30px;
}
Reply With Quote
  #6 (permalink)  
Old Mar 28th, 2007, 13:30
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: inline lists and rollovers

yep.... just looking at that method in one of my text books at the moment.

Its a bit more straight forward so ill change it to that method i think

** on to curvey box's now
Reply With Quote
  #7 (permalink)  
Old Mar 28th, 2007, 13:32
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: inline lists and rollovers

oh yeah. ... those are fun. I just did some not too long ago ... I can post the code if you want Unless you want to try and figure it out first
Reply With Quote
  #8 (permalink)  
Old Mar 28th, 2007, 15:16
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: inline lists and rollovers

its ok... im using the sliding doors method
Reply With Quote
  #9 (permalink)  
Old Mar 28th, 2007, 15:19
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: inline lists and rollovers

Yeah ... that's what I used too ... but I had a hell of a time to make it work for some reason
Reply With Quote
  #10 (permalink)  
Old Mar 28th, 2007, 22:23
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: inline lists and rollovers

yeah its odd.... it seems the layout of the html is more important than u'd normall imagine... buty i got it working... new design on its way
Reply With Quote
  #11 (permalink)  
Old Mar 29th, 2007, 01:27
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: inline lists and rollovers

I noticed you're using longhand for a lot of things. Feel free to check out my nice little article on CSS Shorthand.
Reply With Quote
Reply

Tags
li ul

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
Hyperlink Rollovers crackafaza Web Page Design 3 Aug 24th, 2007 11:43
Image Rollovers DDock3287 JavaScript Forum 14 Aug 16th, 2007 18:57
Inline div Echilon Web Page Design 0 Feb 3rd, 2006 16:06
display inline ???? hessodreamy Web Page Design 3 Oct 8th, 2005 05:51
ImageReady rollovers gwx03 Graphics and 3D 9 Jul 6th, 2004 07:48


All times are GMT. The time now is 13:31.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs 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 43