• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug Customization how to make transparent navbar buttons w/ dividing lines?

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #128 (Sunrise or Sunset), ShootingStar.

The next Dgrin Challenge DSS #129 (Silhouette Revisited ) is open for entries through May 27th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Old Aug-14-2009, 11:43 AM
#1
BeckmannPhotos is offline BeckmannPhotos OP
Big grins
how to make transparent navbar buttons w/ dividing lines?
It's been a while since I've messed with the CSS code and I can't figure out how to do this, and no luck with a search.

I would like to make my nav bar buttons transparent, or even black like my background, with white text. Also, in between each navbar button/word, I would like a white dividing line. I'm looking for a real similiar look to the navbar on this page:

http://emilydelph.smugmug.com/

My site is www.mattbeckmann.com.

TIA
__________________
Matt
http://www.mattbeckmann.com
Old Aug-14-2009, 12:57 PM
#2
J Allen is offline J Allen
Major grins
J Allen's Avatar
The red represents the text color

The green represents the box background color

The last rule is the "hover" rule, same things apply as stated above, only this happens when the mouse hovers over the link.
Code:

#navcontainer ul {
    margin: 10px auto 0; /*top right/left bottom */
    padding: 0;
    list-style-type: none;
    text-align: center;
}

#navcontainer ul li {
    display: inline;
}

#navcontainer ul li a {
    text-decoration: none;
    padding: .2em 1em;
    color: #fff;
    background-color: #4d4d4d;
}

#navcontainer ul li a:hover {
    color: #4d4d4d;
    background-color: #fff;
}


So to have it like the the example you showed change your nav-bar CSS rules to these:


Code:


#navcontainer ul {
    margin: 10px auto 0; /*top right/left bottom */
    padding: 0;
    list-style-type: none;
    text-align: center;
}

#navcontainer ul li {
    display: inline;
}

#navcontainer ul li a {
    text-decoration: none;
    padding: .2em 1em;
    color: #fff;
    background-color: none;
}

#navcontainer ul li a:hover {
    color: white;
    background-color: #202020;
}
Then change your custom header box to this, to have the seperating lines:



Code:



<div id="navcontainer">
<ul>
<li><a href="/">Home</a></li>&nbsp;|
<li><a href="/gallery/5581584_H3gbU">Portfolio</a></li>&nbsp;|
<li><a href="/galleries">Galleries</a></li>&nbsp;|
<li><a href="/map">Map</a></li>&nbsp;|
<li><a href="/mysearch">Search</a></li>&nbsp;|
<li><a href="gallery/5702679_F9pm3">Services</a></li>&nbsp;|
<li><a href="/gallery/5629316_pBcK7">About</a></li>&nbsp;|
<li><a href="/gallery/5590449_oJFpj">Guestbook</a></li>
</ul>
</div>

__________________
-Joe Allen
My Smugmug Site
Tell The World!  

Thread Tools
Display Modes

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