ReviewReviewReviewReviewReviewCUSTOM NAVIGATION BAR AND SITE TITLE BOXDec 25, '07 9:24 PM
by maria for everyone
Category:Other

Customizing Menu and Site Title

CUSTOM NAVIGATION BAR AND SITE TITLE BOX - almost ALL THEMES
This code will remove the style for Navigation Bar and Title Box
It is excluded from this code the box I name Global Header,
that is the area where are the MP logo and the Global links: Inbox, MySite, ....,Search.


It's hard to make tutorials good for all the themes
every theme has some difference in the names used for the Selectors

So this code will work fine with many themes but not is good for all the themes.
For some themes it is good with some modify here and there.
For other themes the Nav Bar use a different code.


WORKING FOR THE THEMES: Classic, Black Lily, Avlack, Sandskrit, Melon, Oasis, Blocks, Skyline, Shadow, Petals, Outburst, Red Frog, Mykonos, Retro, Whiteout, Live Love Laugh, MOD, Bacchus, Dance With Me, Bloody Romance.
PARTIALLY WORKING FOR THE THEMES:Japanese Minimalist, Newspaper, Blue Slate. [just little things]
DOESN'T WORK FOR THE THEMES (different nav bar): Clean, Andros, Custom Colors, Basecamp.
TITLE & NAVIGATION BAR - OWNER HEADER
[it is excluded the Global Header]
All the paddings and margins are 0px all the height and width auto
This will give the smaller filling size as possible for this area
This is a good start for moving the boxes and enlarging those exactly as u want
Generally in our themes:

width:auto = fills the whole width given by the page wrap

height:auto = fills the lesser height as possible, given by the font-size into the boxes
that is the title font size and the nav links font size multiplied for the line-height: 1.3em.

The line height in em make possible to move up - down the text in the buttons of the nav bar as made by padding top and bottom; but it doesn't introduce mess

The Site Title Box: h1#page_owner_title is the box where u add the text by using the Site Title Edit box (Customize My Site -> Edit Site Title Box)

Header Area - Clean Code


/* ### START Header Area - Clean Code ### */
/* Header Area [ Title Box + Navigation bar] */
div#owner_nav {
background:yellow none;
border:none;
height:auto;
width:auto;
margin:0px auto;
padding:0px;
}
/* Site Title Box */
h1#page_owner_title {
background:green none;
border:none;
font-family:Arial,sans-serif;
font-weight:bold;
color:black;
margin:0px auto;
padding:0px;
width:auto;
height:auto;
}
/* Site Title Font-size*/
h1 {
font-size:24px;
}
/*Navigation Bar - Containers Boxes */
div#subnavc {
background:pink none;
border:none;
width:auto;
height:auto;
margin:0px auto;
padding:0px;
}
div#subnav {
background:transparent none;
border:none;
width:auto;
height:auto;
margin:0px auto;
padding:0px;
}
/* ### TAB LINKS - Buttons ### */
/* Navigation Bar - TOP Tabs all buttons/links */
a.topt, a.topt:link, a.topt:visited {
background:#aaaaaa none;
border:1px solid pink;
font-family:Arial;
font-weight:normal;
font-size:11px;
font-style:normal;
text-align:center;
text-decoration:none;
line-height:1.3em;
color:black;
width:80px;
height:auto;
margin:0px;
padding:0px;
}
/* Navigation Bar - TOP Tab SELected link */
a.toptsel, a.toptsel:link, a.toptsel:visited {
background:white none;
border:1px solid #666666;
font-family:Arial;
font-weight:normal;
font-size:11px;
font-style:normal;
text-align:center;
text-decoration:none;
line-height:1.3em;
color:#666666;
height:auto;
width:80px;
padding:0px;
margin:0px;
}
/* Navigation Bar - Buttons when mouse is over */
/* All Links */
a.topt:hover {
background:#cccccc none;
border:1px solid #444444;
text-decoration:none;
font-style:normal;
color:#666666;
}
/* Selected Link */
a.toptsel:hover {
background:#dddddd none;
border:1px solid #666666;
text-decoration:none;
font-style:normal;
color:#666666;
}
/* Navigation Bar - Buttons when you click over */
/* All Links */
a.topt:active {
background:#333333 none;
border:1px solid red;
text-decoration:none;
color:#cccccc;
}
/* Selected Link */
a.toptsel:active {
background:#666666 none;
border:1px solid #999999;
text-decoration:none;
color:#999999;
}
/* ### END Header Area - Clean Code ### */


Starting from the code above it is simple to customize that as you like
You have to know the use of padding, margin, height and width.
of course the Top - Bottom - Left - Right are referred to the respective sides of the box
CSS Box Model
margin areaBorder
padding area
Box CONTENT
The content of the box fills this area as u see the text here.
The background properties (image and color) for this box will be visible in the Content + Padding Area
Pratically the Padding make the space between the Content and the Border leaving beneath the background
The Margin make the space between this box and the other contiguous boxes appearing in the layout and the background will be that of the containing box.

width and height for the box are referred to the Content width and height (excluding padding border and margin))
This for all the browser xxcept than for the IE 5.5 and previous versions.
For those it exist some box model hack
The base code I give and the next procedure I propose is free from this problem anyway I suppose its a too much esoteric argument; about this search on Google for: IE box model hacks
Look the scheme for the different behavior for IE lte 5.5 ver. (lesser then or equal to version 5.5)
I'm talking of this cause I suppose the double box subnav and subnavc was introduced to use a box model hack consisting in to use the external subnavc box only for the width, heigth, margin and border with padding:0px; , and the internal box subnav for introducing the padding (eventually the margin) leaving the width and height to auto and border:none; .
Anyway you know IE 5.5 is a very old browser so you could to ignore it ;)

Though with IE 6 too you can to find some little difference confronted to FireFox, so if you wanna make a valid theme YOU MUST TO TEST YOUR THEME AT LEAST WITH BOTH IE AND FF.
My effort preparing the code is to make an identical look with all the browsers.
Boxes Model for the OWNER HEADER AREA
[Site Title Box + Nav Bar]

Site Title Box - Content area
h1#page_owner_title { }
Nav Bar Content area
div#subnavc { } - div#subnav { }
subnavc contains subnav
h1#page_owner_title {margin} h1#page_owner_title {padding} h1#page_owner_title {border}
div#subnavc {margin} div#subnav {padding} div#subnavc {border}
Buttons
a.topt { }
a.toptsel { }
HEADER BOX
div#owner_nav { }
div#owner_nav {padding} div#owner_nav {border}

[DRAFT]
Procedure for customizing the HEADER AREA starting from the code I given above.
This Procedure is just an attempt to formalize with an algorithm a possible way to customize the header area. There are many possible way to obtain the same result. It could be exist a better procedure ;)
Of course it is not necessary to use all the Properties in all the boxes; it is enough tu use only some of those; in general starting from the minimal code above (without padding and margin and with height and width to auto) you have to search adding the lesser number of assignments (property:value;)as possible to maintain the highest order in the layout.

Preparing to create your own Header
Copy the minimal code you find above and paste it at the bottom of your custom CSS box; use the preview to see the changes you make

Positioning the header
in the selector

div#owner_nav {
margin: ...,...,...,...;
}

margin-top:...px; to move down the header
margin-right:...px; to create a space between the left border of the window's browser and the right border of the header; the border will remain fixed to the defined distance from the right border of the window when you resize the window (or with different screen resolutions)
[it means the width of the header change with the window size of the visitor's browser] margin-bottom:...px; to move down the item boxes and the whole body of the site making a gap between the header and the item boxes
margin-left:...px; to move to the left the header

a typical form to use could be

div#owner_nav {
margin: ...px,auto,...px;
}
where first is margin top, second are the left and right margins and third is margin bottom;
The value auto assigns to left and right an automatic simmetric space, centering the box in its containing box.
another used is

div#owner_nav {
margin: 0pt,auto;
}



backgorund image & background color

(bg color is overlaid by bg image)
Normally u want to put an image in the Header, or you want to fill it with some color

If the image affects both the title and nav areas

then you have to add that in

div#owner_nav {
width:...px;
height:...px;
}

else If the image affects only the title (leaving below the nav bar with another background)
then u have to use the selector h1#page_owner_title

h1#page_owner_title {
width:...px;
height:...px;
}

now the h1#page_owner_title with the contained image is aligned to the left
an elegant way to center it is

h1#page_owner_title {
margin:0pt auto;
}

this gives 0px to top and bottom margins and automatic length to left and right margins so that the two margins will be equals with any screen resolution. It is not recognized by IE lte5.5



Use the padding in h1#page_owner_title to move the site title text into the Header


Positioning the Navigation Bar AKA Menu
After you have positioned the Site Title Text and the bg image for the header you have to posizioning the Nav Bar;
Use the margin top in div#subnavc to move down the nav bar creating space between the title box and it
Use the margin left in div#subnavc to move to the right the nav bar in a fixed way
div#subnavc {
margin-top:...px;
margin-left:...px;
}

if u want to center the Nav Bar in the page then use
div#subnavc {
margin-left:auto;
margin-right:auto;
width:...;
}
or as equivalent form
div#subnavc {
margin:...px auto;
width:...;
}

if u want to move the nav bar to the right, maintaining it anchored to the right border of the window then use
div#subnav {
margin-left:auto;
margin-right:0px;
width:...px;
}
note that normally the nav fills all the width of the containing box (the header) therefore if you do not assign some fixed value in pixel for the width the nav doesn't move itself (in the code the value is auto ).
you can to apply this code to the div#subnav { } selector/box too obtaining the same results.

Remember to maintains the div#owner_nav containing both the h1#page_owner_title and the div#subnavc;

If u want a background and/or a border for the whole navigation bar you have to add that in div#subnavc and in the same box you have to define the exact width and height for that or you could to use a bar in the whole width of the page.
after use can to use the padding in div#subnav leaving width and height to auto and do not use any padding in div#subnavc (its a IE lte 5.5 box model hack).

Now you have to customize the Buttons/Links/TABS.
a.topt and a.toptsel are contained in the div#subnavc box
just define width and height for the buttons and
use the margin-left and/or the margin-right to separate the buttons
use the line-heght:1.3em; to change the vertical position for the links
do not use the padding top for this if u already are defining the height (IE lte 5.5 box model hack)



I need to see some particular example to make the general rule (I hope)


An example
Avlack Theme adding
background header image of 780 X 347 (the original header is 780 X 200)
background nav bar image of 780 X 40 (the original is 780 X 28px + 6 px of white border-top)
starting from the code above I insert here only the changed lines


div#owner_nav {
background:transparent none;
}

h1#page_owner_title {
background:white url(image_URL) no-repeat scroll center top;
width:780px;
height:347px;
}

div#subnavc {
background:white url(image_URL) no-repeat scroll center top;
width:780px;
height:40px;
}
a.topt, a.topt:visited, a.topt:link {
background:transparent none;
border:none;
line-height:40px;

}
a.toptsel, a.toptsel:visited, a.toptsel:link {
line-height:38px;
/*leaving 2 pixels taken by the border top and bottom used for buttons*/
}
/*Some exemplicative visual effect for buttons when mouse over and active button*/
a.topt:hover {
border:1px solid #444444;
background:#cccccc none;
height:38px;
line-height:38px;
width:78px;
/*leaving 2 pixels taken by the border left and right used for buttons*/
}
a.topt:active {
color:#cccccc;
border:1px solid red;
background:#333333 none;
height:38px;
line-height:38px;
width:78px;
/*leaving 2 pixels taken by the border left and right used for buttons*/
}


just some commment

That I like of the code is that u can to use the true values for the images, as I suppose should to be :)

you obtain the result starting from the "header - Clean Code" above, that remove all the changes introduced by the base theme, so that u have only to do the right changes, not searching to change the pre loaded base theme.
The code is very simple; I added the Toptsel, topt:hover and topt:active blocks only for making visible some kind of layout and how to make it (note its complex cause I have a border for the buttons only with over and active

as u see in the buttons
I'm usimg the selected button as in the original Header - Clean Code
and removing the border and background from all the others buttons
so that u can to appreciate the difference between to use the border or not

I discovered the line height property some day ago cause I found it in the classic theme layout (I'm learning css as you)
I feel it's working fine :)
it moves up down the text into the buttons as u like .. without any other thought on padding and height.



To Be Completed........


22 Comments
greeneyezdreamz wrote on Dec 28, '07
HI Ann, I've had time today to re read this and I tried it once with nothing changing but i'll try it again Thank you so very much for taking the time to help me and sending this Help to me. I'll get it yet, I guess I'm making it harder than it really is on me. I loved your Christmas pages and all that ya did with them.
I just cant wait to see all that ya do for New Years, I just know its going to be so awesome looking.
A VERY HAPPY NEW YEAR to you I hope its going to be one thats filled with happiness good health for All.
TGC My Friend Love & Hugs , Ann xoxo
Comment deleted.
alogena wrote on Dec 28, '07
@ Ann
Hi Ann
happy new hear
(the code in this post doesnt work for Clean and Andros - custom colors themes)

@ matrock
Hi
PLEASE REMOVE THAT CHAT BOX (its invisible too !!!)
or u re edit the post removing the chat widget or I'll delete the message ,, tomorrow
ciao
sixteenramos wrote on Dec 29, '07
Hello! I have a question regarding the title box and comment boxes. I have codes pasted on my css box to have all my boxes transparent but I can't seem to get my title box transparent. It's still blue. So as my comment boxes. When Multiply upgraded or something, my site changed entirely and suddenly my codes don't work anymore. Could you see my site and suggest some things I could do to make my title box and my comment boxes transparent? Thank you!
bindra wrote on Dec 29, '07
That blue part can be made transparent by this code,

div#owner_nav_wrapper { background: none transparent; }
alogena wrote on Dec 29, '07, edited on Dec 29, '07
use the bindra's code

I'll make a post for the nav bar in default themes clean and andros

for the replies - comments
search in the home page of the group the link to the reply boxes post
if that code doesnt work
put a reply in that thread

sixteenramos wrote on Dec 29, '07
thanks guys! I saw the codes on the homepage of the group. Your codes solved the problem. =)
elegantii wrote on Jan 24
How do I add graphics to others guestbooks and comments sections? Thanks.
alogena wrote on Jan 24
add this code in the reply , where Image_URL is the URL of the image u wanna put there

<img src="Image_URL">
nielli wrote on Feb 16
ReviewReviewReviewReviewReview
This css model is really great. Being a nurse, I know that there are two types of thinkers...one thinks right brain which means the boxes you drew help these people grasp the idea...while the the left brain people grasp the written word better. You have now put these together. Very nice. Ni
alogena wrote on Feb 16
tnx Ni :)
cutediana2007 wrote on Feb 29
thx ^^
tramsformer wrote on Mar 9
hi helo cAn i u help me to my layout????


im looking a overlayouts to my multiply??
wer cAn i find the codes??
alogena wrote on Mar 9
try searching in the home page for overlay
tramsformer wrote on Mar 9
[move] wat site cAn i find [/move]
tramsformer wrote on Mar 9
[color=blue] wer cAn i search [/color]
alogena wrote on Mar 9
what ?
paulitionista wrote on Mar 18
ReviewReviewReviewReviewReview
thanks a lot :) it's really useful,
alogena wrote on Mar 18
ahhah tnx

this post is still unfinished
not is simple find the best way for to explain how to make the customizations
I need a lot of time for make my posts
^.^
wreckondition wrote on Apr 10
ReviewReviewReview
i want to put the nav bar on the center.
the code doesn't work
alogena wrote on Apr 10, edited on Apr 11
for CENTERING the nav bar there are two methods

you have two boxes:
div#subnavc and div#subnav

subnavc contains subnav
think subnavc as the Container for subnav
normally both the width of these boxes are set to Auto

it means the width will get the whole available space , given by the width of the div#owner_nav
(normally is the same that the width of the itemboxes)





FIRST METHOD (the elegant method)

you have to define a fixed width for the div#subnav and to use this code

div#subnavc {
background:#444444 none;
width:auto;
}
div#subnav {
background:#555555 none;
margin: 0 auto;
width:400px;
}

the problem of this code is
you have to know the width for the nav bar
if u add a new link in the nav bar you have to change the defined width too.
probably it's more simple to understand just putting the code in the site and looking it
the box is centered by the margin:auto given to margin-left and margin-right
margin 0 auto means o for top and bottom , auto for left and right


SECOND METHOD

you can to use the padding left in the subnav box (the contained box)


div#subnavc {
background: #444444 none;
width: auto;
}
div#subnav {
background: #555555 none;
padding-left: 200px;
width: auto;
}


of course you have to define the margin left as u see it centered
reirose1228 wrote on Jul 15
ReviewReviewReviewReview
Help! i want to put my photo as a header but i don't know how to do it. help please....
Add a Comment
How would you rate this thing? (optional)
   
CSS 4 MP
Join this Group!RSS FeedHelp on RSS FeedsAdd to My Yahoo
Report Abuse
© 2008 Multiply, Inc.    About · Blog · Terms · Privacy · Corp Info · Contact Us · Help