Jump to content
Sign in to follow this  
apattee

I need help styling and centering secondnav . . .

Recommended Posts

apattee

I'm using the Transparency child theme and I can't figure out how to add a background to the secondnav section. Ideally, I could add a black background that has an opacity of 65%.

Secondly, I'd like to center the secondnav section, though I'm guessing I need to style each page that it's on to add the correct padding. Either way, I can't figure out that part either.

Any help would be appreciated. Thanks.

example page here:

http://dev.leportschools.com/huntington-harbor/

Share this post


Link to post
Share on other sites
James B

Hi there,

You could try


#secondnav.container {

    background: none repeat scroll 0 0 rgba(0, 0, 0, 0.62);

    margin: 0;

}

and to center

#secondnav ul {

    list-style: none outside none;

    margin: 0;

    padding-left: 190px;

}


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
apattee

Hi there,

You could try


#secondnav.container {

background: none repeat scroll 0 0 rgba(0, 0, 0, 0.62);

margin: 0;

}

and to center

#secondnav ul {

list-style: none outside none;

margin: 0;

padding-left: 190px;

}

I tried the background code and it didn't work. Any other ideas? I can get it to show using firebug, but when I paste it into my css, it won't show.

Share this post


Link to post
Share on other sites
Danny

Hi,

To add a transparent black background to your secondary nav, use the code below. Please bear in mind that not all browsers support rgba background code especially old versions of Internet Explorer.


#secondnav .secondnav_menu {
background: rgba(0, 0, 0, 0.6);
padding: 5px;
}
[/CODE] To center your secondary navigation, use the code below:
[CODE]
#secondnav ul {
text-align: center;
}
#secondnav ul li {
float: none !important;
display: inline-block;
}


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
apattee

Hi,

To add a transparent black background to your secondary nav, use the code below. Please bear in mind that not all browsers support rgba background code especially old versions of Internet Explorer.


#secondnav .secondnav_menu {

background: rgba(0, 0, 0, 0.6);

padding: 5px;

}

To center your secondary navigation, use the code below:

#secondnav ul {

text-align: center;

}

#secondnav ul li {

float: none !important;

display: inline-block;

}

Thanks for trying to help, but it's still not working - neither the background or the centering. Any other ideas?

Share this post


Link to post
Share on other sites
Rob

I'm not sure how that secondary nav is working in your child theme. It appears to have embedded in the menu itself and thus can't be segregated by CSS for modification. I'll have to ask the developer.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×