Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Rollover border links with css
Old 09-21-2006, 09:54 PM Rollover border links with css
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
Ok I made links that have a hover which puts the link in a border.

see http://www.thelnews.com/fiorelladesigns/index.html

the navigation

but you can see the links are very spread out and they move when you hover over them

How can I fix this so they are normal links like close together.

Thanks
ben
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-21-2006, 11:34 PM Re: Rollover border links with css
Experienced Talker

Posts: 30
Name: Ben Henick
Trades: 0
You're changing the layout properties of your links as a result of manipulating a border that doesn't always exist. So:

a:link,a:visited {
border: 0;
padding: 1px;
}

a:hover,a:active {
border: 1px solid rgb(214,166,3)
padding: 0;
}
persist1 is offline
Reply With Quote
View Public Profile
 
Old 09-23-2006, 12:39 AM Re: Rollover border links with css
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
That did nothing

Any other ideas


Thanks
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 09-23-2006, 10:31 AM Re: Rollover border links with css
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you have anchors inside #navcontainer as block elements which will put a implied line break, <li>s already have an implied line break AND you have a <br> after each <li>

So 3 line breaks per nav and it isn't surprising there are gaps.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-23-2006, 01:13 PM Re: Rollover border links with css
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
Thanks, that took care of the spacing.

But when I hover over the links it pushing the link and the image below it down a little. The links move

How do i fix that?

Thanks
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 09-23-2006, 01:25 PM Re: Rollover border links with css
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
Ok I fixed that, now the only time it moves is when you roll over a visited link.

Please Help
Thanks
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 09-23-2006, 02:36 PM Re: Rollover border links with css
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
a.nav:visited
{
color:#888888;
text-decoration:none;
padding:2px;

The other pseudo classes only have 1 px padding. You have to make everything consistent or you get the little shift. You also have to compensate for the fact that the normal state has no borders and your hover states do.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-23-2006, 03:29 PM Re: Rollover border links with css
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
No,

a.nav:link

has to have a padding of 2px

and

a.nav:hover

has to have a padding of 1px

Because hover also has a border of 1px


Everything works except a visited link. Then things move.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 09-23-2006, 03:36 PM Re: Rollover border links with css
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Fine.. but I told you, your VISITED style has a 2px adding.. of course it's going to jump !
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-23-2006, 04:17 PM Re: Rollover border links with css
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
I wasn't being mean about it. I'm just saying it doesn't work.

How do I fix it?

Thanks
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 09-23-2006, 08:10 PM Re: Rollover border links with css
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
read your style sheet for goodness sake

visited has padding of 1px all round

all others have 2px all round or 1px padding plus a 1 px border

THEREFORE visited links are 2px SMALLER than all the others
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-23-2006, 11:10 PM Re: Rollover border links with css
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
Im not stupid, no matter what I change it to nothing works.

I have made the padding on visited links 0, 1, 2, 3px's nothing works.

So apparantly what you fail to tell me is not that obvious.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 09-24-2006, 08:50 AM Re: Rollover border links with css
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you are using thin for border width, thin does NOT equal 1 px

As I said read the style sheet, then understand the differences.
Yes, we can simply post verbatim solutions to problems but in the long run it doesn't help you with learning how to solve problems, or how to avoid future issues.

One piece of advice I was given by my college lecturer was to "always treat the person before you as an idiot" Which translates to "never trust their work until you have checked for yourself"
The same holds true for your own work, check it and check it again.


Also the order of your pseudo elements is wrong it should be

Link
Visited
Hover
Active

LoVe HAte
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-24-2006, 03:28 PM Re: Rollover border links with css
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
There, I fixed it...

Thanks for all of your help, I really do appreciate it.

Ben
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 09-26-2006, 08:40 PM Re: Rollover border links with css
Webmaster Talker

Posts: 626
Trades: 0
Curious Question: Would the problem with the shifting not occured because of the box model difference with IE/FF?

I thought that IE includes the width of the border in the total width whereas FF adds it on to the total width. Is that not right??

Also... Lunchbox170 - I just went to your site and it still shifts over the links and I haven't visited anything. So if you have already updated that link with the corrected code it still isn't working properly, but if you haven't updated the page then disregard this.

But if someone could clarify my question for me that would be great.

Thanks.
jim.thornton is offline
Reply With Quote
View Public Profile
 
Old 09-27-2006, 04:32 PM Re: Rollover border links with css
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
Would the problem with the shifting not occured because of the box model difference with IE/FF?
Yes.. and no. While the box model problem is a factor, the behavior was the same inside just Firefox, which renders boxes, margin and padding per the standards.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 10-07-2006, 05:11 PM Re: Rollover border links with css
Novice Talker

Posts: 7
Name: Musicmaza
Trades: 0
Thankyou friend

Best Regards

Musicmaza
<please create a forum signature>

Last edited by vangogh; 10-08-2006 at 07:01 PM..
musicmaza is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Rollover border links with css
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.73343 seconds with 12 queries