PDA

View Full Version : Search box in my navbar


allyl
Mar-28-2008, 03:30 AM
My css looks like this


/* CSS Dropdown Nav Bar*/
/* Original code by Stu Nicholls of*/
/* http://www.cssplay.co.uk/ */
/* Edited by me for content, formatting and some elements */
/* Please help support CSSPlay at: */
/* http://www.cssplay.co.uk/support.html */


/* CSS Section */

/* style the outer div to give it width */
.menu {
margin: auto;
padding:10px 0px 15px 0px;
position:relative; /*Make the container moveable*/
width:750px; /*Main bar total width*/
font-size:0.85em;
padding-bottom:30px; /*Padding between the bottom of your mainbar and the rest of your page */
}
/* remove all the bullets, borders and padding from the default list styling */
.menu ul {
padding:0;
margin:0;
list-style-type:none;
}
.menu ul ul {
width:125px; /* Cell size. Divide the main width (750px) by the number of cells you need */
}
/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
.menu li {
float:left;
width:125px; /* Cell size. Divide the main width (750px) by the number of cells you need */
position:relative;
}
/* style the links for the top level */
.menu a, .menu a:visited {
display:block;
font-size:11px;
text-decoration:none;
color:#000000;
width:100; /* Defines the main box dimensions. */
height:30px; /*How tall your cells are*/
border:1px solid #fff;
border-width:1px 1px 0 0;
background:#FCD116;
padding-left:10px;
line-height:29px; /*Adjust this to vertically center your text in each cell. Should be about the same as height. */
}
/* a hack so that IE5.5 faulty box model is corrected */
* html .menu a, * html .menu a:visited {
width:125px;
w\idth:139px;
}

/* style the second level background */
.menu ul ul a.drop, .menu ul ul a.drop:visited {
background:#949e7c;
}
/* style the second level hover */
.menu ul ul a.drop:hover{
background:#c9ba65;
}
.menu ul ul :hover > a.drop {
background:#c9ba65;
}
/* style the third level background */
.menu ul ul ul a, .menu ul ul ul a:visited {
background:#e2dfa8;
}
/* style the third level hover */
.menu ul ul ul a:hover {
background:#b2ab9b;
}
.menu ul ul ul :hover > a {
background:#b2ab9b;
}

/* hide the sub levels and give them a positon absolute so that they take up no room */
.menu ul ul {
visibility:hidden;
position:absolute;
height:0;
top:31px;
left:0;
width:125px; /* Size of the daughter cells */
}
/* another hack for IE5.5 */
* html .menu ul ul {
top:30px;
t\op:31px; /* IE gap between main bar and the dropdown items */
}


/* position the third level flyout menu */
.menu ul ul ul{
left:125px;
top:0;
width:125px;
}
/* position the third level flyout menu for a left flyout */
.menu ul ul ul.left {
left:-125px;
}

/* style the table so that it takes no ppart in the layout - required for IE to work */
table {position:absolute; top:0; left:0;}

/* style the second level links */
.menu ul ul a, .menu ul ul a:visited {
background:#d4d8bd;
color:#000;
height:auto;
line-height:1em;
padding:5px 10px;
width:129px
/* yet another hack for IE5.5 */
}
* html .menu ul ul a{
width:125px;
w\idth:129px;
}


/* style the top level hover */
.menu a:hover, .menu ul ul a:hover{
color:#fff;
background:#949e7c;
}
.menu :hover > a, .menu ul ul :hover > a {
color:#fff;
background:#949e7c;
}

/* make the second level visible when hover on first level list OR link */
.menu ul :hover ul{
visibility:visible;
}
/* keep the third level hidden when you hover on first level list OR link */
.menu ul :hover ul ul{
visibility:hidden;
}
/* keep the fourth level hidden when you hover on second level list OR link */
.menu ul :hover ul :hover ul ul{
visibility:hidden;
}
/* make the third level visible when you hover over second level list OR link */
.menu ul :hover ul :hover ul{
visibility:visible;
}
/* make the fourth level visible when you hover over third level list OR link */
.menu ul :hover ul :hover ul :hover ul {
visibility:visible;
}

/* End Navbar Code */



#bioBox .photo {
display: none;
}

.homepage #galleriesBox,
.homepage #categoriesBox,
.homepage #featuredBox {
display: none;
}

.galleries #bioBox {
display: none;
}

.galleries #galleriesBox,
.galleries #categoriesBox,
.galleries #featuredBox {
display: block;
}


#feeds {
display:none;
}

.cartlink_footer {display: none;}

.share_button { display: none; }
.loggedIn .share_button { display: block; }
#breadcrumb {visibility: hidden;}
#altViews {visibility: visible;}
.loggedIn #breadcrumb {visibility: visible;}

#mysearch {
text-align: center;
}


Can you tell me how I change thre "Guestbook" header to a search box , using the same colour and text.

Thanks

zack75144
Mar-28-2008, 08:44 AM
Hi Ally, I'd be interested in this also.
You can make it easier for the code masters if you provide them with a link to the website in question.
Good luck!:thumb

Allen
Mar-28-2008, 10:52 AM
My css looks like this

...

Can you tell me how I change thre "Guestbook" header to a search box , using the same colour and text.

Thanks
A link to your site would be helpful.

Add this to your nav and see if this is what you want.

<li>........
<li>SMUGSEARCH</li>
</ul>
</div>

zack75144
Mar-28-2008, 02:09 PM
it works well Allen, but can you also give us the code for a search bar in the footer?

Ally apologies for hijacking your thread.:rolleyes

Allen
Mar-28-2008, 02:13 PM
it works well Allen, but can you also give us the code for a search bar in the footer?

Ally apologies for hijacking your thread.:rolleyes

Try this in your footer.
To search your whole site on matter where you are at, remove
the SMUGSEARCH if you like and add or replace with the following:

<form method="get" action="http://NICK_NAME.smugmug.com/search/index.mg">
<input type="text" name="searchWords" />
<input type="hidden" name="searchType" value="InUser" />
<input type="hidden" name="NickName" value="NICK_NAME" />
<input type="submit" name="sa" value="Search" size="20" class="buttons"/>
</form>

Replace the 'NICK_NAME' with your site's nickname.

Customize with some CSS

#mySearch {
margin: 0 auto;
text-align: center;}

#mySearch input {background: #5B3C3A; color: #ccc;}