Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-20-2012, 06:42 AM   PM User | #1
tmacka88
New Coder

 
Join Date: Nov 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
tmacka88 is an unknown quantity at this point
css nav bar with border problem

Ok. So i am making a nav bar and i am running into a problem with with the :active function. I basically want the border to be 2px rather than 4px and move the whole button down 2px to give it a look as if it is pressed in.

here is the nav bar so far.

http://jsfiddle.net/Xuybs/

I problem im having is with using the border and radius. the only way i can get the border to round out on either side of the bar is to have the border in the #navbar-wrapper. If i put in the the #nav-home a:active the border does not round out.

any help would be great. thanks
tmacka88 is offline   Reply With Quote
Old 11-20-2012, 04:11 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello tmacka88,
A little top margin makes it look like the button is pressed -
Code:
#narbar-wrapper ul a:hover {
    color: #e8e8e8;
  margin-top: 4px;
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 11-20-2012, 11:15 PM   PM User | #3
tmacka88
New Coder

 
Join Date: Nov 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
tmacka88 is an unknown quantity at this point
Quote:
Originally Posted by Excavator View Post
Hello tmacka88,
A little top margin makes it look like the button is pressed -
Code:
#narbar-wrapper ul a:hover {
    color: #e8e8e8;
  margin-top: 4px;
}
Yeh thats works, fine.

The only other problem is I also want it to separate from the top position when clicked also. e.g as if the whole button moved down. like this getactionsapp.com
tmacka88 is offline   Reply With Quote
Old 11-20-2012, 11:44 PM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by tmacka88 View Post
Yeh thats works, fine.

The only other problem is I also want it to separate from the top position when clicked also. e.g as if the whole button moved down. like this getactionsapp.com
I think just changing the background color on active would do that for you...
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 11-22-2012, 06:00 AM   PM User | #5
tmacka88
New Coder

 
Join Date: Nov 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
tmacka88 is an unknown quantity at this point
success! think i have been looking at it too long to pick it up...

thanks
tmacka88 is offline   Reply With Quote
Reply

Bookmarks

Tags
border, css, nav

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 07:26 AM.


Advertisement
Log in to turn off these ads.