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 01-29-2013, 02:17 PM   PM User | #1
brittanylynn01
New to the CF scene

 
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
brittanylynn01 is an unknown quantity at this point
Angry Header needs to be moved down on my site PLEASE HELP

I am coding a child theme for a website using wordpress. I had changed some of the CSS to make the nav bar on the top stay fixed when scrolling. When I made those changes, the header moved up. how can I move the header down while also making it fixed and only have the body scroll. Thanks in advance. any help would be greatly appreciated

site:http://www.fillyshred.com/install

coding in the child theme style.css sheet thus far:

/*
Theme Name: Pink Touch 2- Child Theme
Description:
Author: admin
Template: pink-touch-2

(optional values you can add: Theme URI, Author URI, Version)
*/

@import url("../pink-touch-2/style.css");

body {
background: top center no-repeat;
color: #a22665;
font-size: 16px;
font-family: Arial, Times New Roman, Trebuchet MS;
margin: 0 auto 0;
padding: 0;
line-height: 20px;
}

/****************navbar**************/
#nav-menu {
display: block;
float: left;
color: #a22665;
font-size: 12px;
margin: -4px 0px 4px -16px;

}

#navigation{position:fixed;z-index:1}
#navigation-frill{position:fixed;z-index:2;margin-top:25px}
brittanylynn01 is offline   Reply With Quote
Old 01-29-2013, 11:53 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 brittanylynn01,
You should probably put #navigatin outside of #wrapper. Then you can put a top margin on #wrapper so it clears the fixed nav above it.

Like this -
Code:
	<div id="navigation">
			<div class="wrapper clearfix">
				<div id="nav-menu" class="menu-home-container"><ul id="menu-home" class="menu"><li id="menu-item-36" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-36"><a href="http://www.fillyshred.com/install/about/">About</a></li>
<li id="menu-item-35" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-35"><a href="http://www.fillyshred.com/install/events/">Events</a></li>
<li id="menu-item-32" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-32"><a href="http://www.fillyshred.com/install/updates/">Updates</a></li>
<li id="menu-item-34" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-34"><a href="http://www.fillyshred.com/install/shredder-of-the-month-2/">Shredder of the Month</a></li>
<li id="menu-item-33" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-33"><a href="http://www.fillyshred.com/install/swag-brag/">Swag Brag</a></li>
<li id="menu-item-31" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-31"><a href="http://www.fillyshred.com/install/contact/">Contact</a></li>
</ul></div>				<form method="get" id="searchfield" action="http://www.fillyshred.com/install/">
	<input name="s" onfocus="if ( this.value=='Search' ) this.value='';" onblur="if ( this.value=='' ) this.value='Search';" value="Search" type="text">
</form>			</div>
		</div><!-- /#navigation -->
	<div id="wrapper">
	
		<div id="navigation-frill"></div>

		<div id="header">
			<h1><a href="http://www.fillyshred.com/install/" title="" rel="home"></a></h1>
Code:
#wrapper {
	margin: 40px auto 0; /*adjust as needed*/
	padding-bottom: 60px;
	position: relative;
	text-align: left;
}
__________________
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
Reply

Bookmarks

Tags
code, css, header, 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 09:15 AM.


Advertisement
Log in to turn off these ads.