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 05-10-2011, 10:52 PM   PM User | #1
dpDesignz
New Coder

 
Join Date: Aug 2010
Location: Hamilton, New Zealand
Posts: 88
Thanks: 5
Thanked 4 Times in 4 Posts
dpDesignz is an unknown quantity at this point
Question Menu & Footer placement

I am working on this site (http://www.roctrust.org.nz) and I have my search box which I want to be on top of my nav-bar, but I can only seem to get it under. Can anyone help?

header.php
http://pastebin.com/bTTv7Hmh

style.css
http://pastebin.com/p4SnRHUH

nav.css
http://pastebin.com/rU7030pa

Also my footer on the bottom everything is hugging the bottom of my footer. EVEN if I put padding in. I think I may have missed something. Can anyone help? Style-sheet as above.

footer.php
http://pastebin.com/Tqm86p2M

Thanks in advance
__________________
dpDesignz is offline   Reply With Quote
Old 05-10-2011, 11:49 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Where is the search box on your page?
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Old 05-11-2011, 12:17 AM   PM User | #3
dpDesignz
New Coder

 
Join Date: Aug 2010
Location: Hamilton, New Zealand
Posts: 88
Thanks: 5
Thanked 4 Times in 4 Posts
dpDesignz is an unknown quantity at this point
Currently? Underneath the nav bar. It needs to be on top.
__________________
dpDesignz is offline   Reply With Quote
Old 05-11-2011, 12:26 AM   PM User | #4
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Perhaps my eyes are deceiving me but I can't see any search box on your page. Edited: Unless you mean that it is behind the nav bar?!
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Old 05-11-2011, 12:33 AM   PM User | #5
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Yeah, hiding behind.

Your header is relatively positioned so it sits above your search box. You need to position the search box (absolutely or relatively) and possibly give it a z-index to bring it to the top.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Users who have thanked AndrewGSW for this post:
dpDesignz (05-11-2011)
Old 05-11-2011, 12:42 AM   PM User | #6
dpDesignz
New Coder

 
Join Date: Aug 2010
Location: Hamilton, New Zealand
Posts: 88
Thanks: 5
Thanked 4 Times in 4 Posts
dpDesignz is an unknown quantity at this point
which is what I said it's under. As in beneath not below. .

THANK YOU SO MUCH!!!!

You wouldn't happen to know what's wrong with my footer would you?
__________________

Last edited by dpDesignz; 05-11-2011 at 12:42 AM.. Reason: footer question
dpDesignz is offline   Reply With Quote
Old 05-11-2011, 12:45 AM   PM User | #7
dpDesignz
New Coder

 
Join Date: Aug 2010
Location: Hamilton, New Zealand
Posts: 88
Thanks: 5
Thanked 4 Times in 4 Posts
dpDesignz is an unknown quantity at this point
Oh dear. New problem. That has now made my nav buttons unclickable?
__________________
dpDesignz is offline   Reply With Quote
Old 05-11-2011, 10:08 AM   PM User | #8
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Quote:
Originally Posted by dpDesignz View Post
Oh dear. New problem. That has now made my nav buttons unclickable?
You need to add 'position: relative;' to the search box otherwise it remains a static, block-level element and obscures the nav bar. Your nav bar could have z-index 1 and the search box z-index of 1 (or 2) to sit just above the nav bar.

(If both items are positioned relatively and have the same z-index of 1, then the search box will sit above the nav bar as is it occurs after the nav bar in the document order. But it will do no harm to give the search box a z-index of 2 )
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Users who have thanked AndrewGSW for this post:
dpDesignz (05-11-2011)
Old 05-11-2011, 10:26 AM   PM User | #9
dpDesignz
New Coder

 
Join Date: Aug 2010
Location: Hamilton, New Zealand
Posts: 88
Thanks: 5
Thanked 4 Times in 4 Posts
dpDesignz is an unknown quantity at this point
Thanks. Except I changed the nav to 1 and the search to 2 and it hid again. So I changed the nav to relatively, making them both the same. The navbar shot up to the top, the search moved down to the content and my sidebar moved to the bottom of the page :S. Hmm. I don't seem to be winning here. . Any ideas? I have updated the pastebin files above to what I now have if you want to take a look. The navbar is called by the navv.css id nav, and the search is called by the style.css search-form id.
__________________
dpDesignz is offline   Reply With Quote
Old 05-11-2011, 11:39 AM   PM User | #10
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
I think you need to re-read my previous post more carefully; in particular, I never advised changing the position for the nav bar to 'relative'.

Quote:
"If both items are positioned relatively and have the same z-index of 1.."
perhaps I should have said:
Quote:
"If both items are positioned and have the same z-index of 1.."
Perhaps this caused confusion? Leave the nav bar as 'position: absolute;'.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Old 05-11-2011, 12:12 PM   PM User | #11
dpDesignz
New Coder

 
Join Date: Aug 2010
Location: Hamilton, New Zealand
Posts: 88
Thanks: 5
Thanked 4 Times in 4 Posts
dpDesignz is an unknown quantity at this point
Sorry. Yea that was it. . So my z-index for the search is 2, and the nav is 1. Still nothing.
__________________
dpDesignz is offline   Reply With Quote
Old 05-11-2011, 02:35 PM   PM User | #12
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Looking at your page http://www.roctrust.org.nz/ you do not have the seach box positioned relatively.

Added: Make the DIV with id 'search-form' 'position:relative;' - not the actual form, but its container div.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS

Last edited by AndrewGSW; 05-11-2011 at 02:37 PM..
AndrewGSW is offline   Reply With Quote
Old 05-11-2011, 09:29 PM   PM User | #13
dpDesignz
New Coder

 
Join Date: Aug 2010
Location: Hamilton, New Zealand
Posts: 88
Thanks: 5
Thanked 4 Times in 4 Posts
dpDesignz is an unknown quantity at this point
Quote:
Originally Posted by AndrewGSW View Post
Looking at your page http://www.roctrust.org.nz/ you do not have the seach box positioned relatively.

Added: Make the DIV with id 'search-form' 'position:relative;' - not the actual form, but its container div.
If you looked at my pastebin above like I said that's what it has been since the beginning when you first said to. The id nav is absolute and the id search-form is relative. It's all in the right place and the z-index works if the nav is -1 and the search-form is 1, but then my nav buttons aren't clickable. Same as before.
__________________
dpDesignz is offline   Reply With Quote
Old 05-11-2011, 10:30 PM   PM User | #14
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
If I look in your paste-bin http://pastebin.com/p4SnRHUH you have the search-form positioned relatively - should be relative.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Old 05-11-2011, 10:45 PM   PM User | #15
dpDesignz
New Coder

 
Join Date: Aug 2010
Location: Hamilton, New Zealand
Posts: 88
Thanks: 5
Thanked 4 Times in 4 Posts
dpDesignz is an unknown quantity at this point
Sorry. forgot to update that one. It is relative.
__________________
dpDesignz is offline   Reply With Quote
Reply

Bookmarks

Tags
css, footer, nav, search, wordpress

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 12:47 PM.


Advertisement
Log in to turn off these ads.