Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Help with centering navigation using a sitebuilder
Old 08-11-2009, 01:21 AM Help with centering navigation using a sitebuilder
Junior Talker

Posts: 2
Name: Joyce
Trades: 0
I'm hoping someone can help me out with this. I recently created my site through website tonight sitebuilder. In the past I had used Frontpage and did it all in tables and cell. I am no longer using it and thought I'd go with something quick and easy for the time being.

Website tonight will let you change out the CSS codes, which I have done a small amount of to tweak it the way I want. I cannot figure out how to get the navigation menu centered. I've tried adding into some of the code: Text align: 'center', I've tried changing the padding from 0 to 14px, all that did was move and spread out the navigation a bit. I've tried a couple other things which did not work either.

The site builder gives the codes in a 'read only' box and then in another box you can use to 'edit' any CSS codes you want to change. Anytime somthing didn't work, I was able to just cut them out of the edit box as the original code stays put in the 'read only' box.

Can anyone figure out what needs to be changed to center the navigation.

Also, I would really love to add another navigation bar to the bottom of the pages. Is this possible?

Also, here is a link to the site: http://majesticglassworks.com

Thanks!

Here are the CSS codes for the 'theme/layout'. They have a separate code box for the color codes.

/**
* @file
* @project 615
* @package sftheme
* @site app1
*/

/**
* ------------------------------------------------------------------
* @section TYPOGRAPHY
* ------------------------------------------------------------------
*/

h1, h2, h3, h4, h5, h6 {font-weight:normal;}
h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
h2 {font-size:2em;margin-bottom:0.75em;}
h3 {font-size:1.5em;line-height:1em;margin-bottom:1em;}
h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;height:1.25em;}
h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
h6 {font-size:1em;font-weight:bold;}
p, form {margin:0 0 1.5em;padding:0;}
blockquote {margin:1.5em;}
sup, sub {line-height:0;}
address {margin:0 0 1.5em;}
pre, code {margin:1.5em 0;white-space:pre;}
pre, code, tt {line-height:1.5;}
li ul, li ol {margin:0 2.5em;padding:0;}
ul, ol {margin:0 1.5em 1.5em 3em;padding:0;}
ul {list-style-type:disc;}
ol {list-style-type:decimal;}
dl {margin:0 0 1.5em 0;}
dd {margin-left:1.5em;}
caption {margin:0; padding:.5em;}
h1, h2, h3 {font-weight:bold;}
/**
* ------------------------------------------------------------------
* @section MAIN AREA
* ------------------------------------------------------------------
*/
body {
font-family:Arial, Helvetica, FreeSans, sans-serif;
font-size:12px;
margin:0px;
padding:0px;
}
.sf_wrapper {
width:970px;
margin:20px auto 0px;
min-height:1%;
height:auto !important;
height:1%;
}
.sf_wrapper:after {
content:".";
clear:both;
height:0;
visibility:hidden;
display:block;
}
/**
* @subsection header
*/
.sf_header_wrapper {
padding:15px 20px 20px;
background-image:url(images/615_header.gif);
background-repeat:repeat-x;
min-height:1%;
height:auto !important;
height:1%;
}
.sf_main_header {
font-size:32px;
font-weight:bold;
}
/**
* @section navigation
*/
.sf_region4 {
min-height:1%;
height:auto !important;
height:1%;
width: 970px;
}
.sf_region4:after {
content:".";
display:block;
height:0;
clear:both;
visibility:hidden;
}
.sf_navigation {
margin: 0px;
width: 970px;
z-index:50;
position: relative;
margin-bottom:7px;
}
.sf_navigation .widget_header{
display:none;
}

.sf_navigation ul {
margin: 0;
padding: 0 9px;
}

.sf_navigation ul:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
height:0px;
}

.sf_navigation ul li {
float: left;
list-style: none;
margin: 0;
padding: 0;
white-space: nowrap;
min-width:1%;
width: auto !important;
width:1%;
}

.sf_navigation ul li a {
display: block;
margin:0px;
padding:6px 12px 7px;
text-decoration: none;
text-transform:uppercase;
font-size:10px;
min-width:1%;
width: auto !important;
width:1%;
}
.sf_navigation ul li a:visited {
}
.sf_navigation ul li a:hover {
}

/**
* @section subnav
*/
.sf_navigation .subnav {
border-style:solid;
border-width:1px;
left: -999em;
list-style: none;
line-height: 1;
margin: 0px;
padding: 0px;
position: absolute;
width: 154px;
z-index:1000;
}

.sf_navigation .subnav li {
float: left;
margin:0;
padding:0;
width: 154px;
white-space:normal;
}

.sf_navigation .subnav li a {
display: block;
height:auto;
padding:5px 12px 6px;
width: 130px !important;
white-space:normal;
font-size:11px;
text-transform:none;
}
.sf_navigation .subnav li a:visited {
}
.sf_navigation .subnav li a:hover {
}

#Nav1 li:hover ul,
#Nav1 li.sfhover ul {
left: auto;
}

#Nav1 iframe {
position: absolute;
left: 0;
top: 0;
z-index: 0;
filter: progid:DXImageTransform.Microsoft.Alpha(style=0,op acity=0);
}
#Nav1 li:hover, #Nav1 li.hover {
position: static;
}
/**
* @subsection content
*/
.sf_extra5 {
display:block;
clear:both;
height:8px;
}
.sf_main_wrapper {
float:left;
width:100%;
}
.sf_main {
margin:0px 8px 8px;
padding:15px 20px 20px;
min-height:200px;
height:auto !important;
height:200px;
}
.sf_main:after {
content:".";
display:block;
clear:both;
visibility:hidden;
height:0;
}
.sf_content {
min-height:1%;
height:auto !important;
height:1%;
}
.sf_content:after {
content:".";
display:block;
clear:both;
visibility:hidden;
height:0;
}

.sf_pagetitle {
font-weight:bold;
font-size:18px;
padding:0px 10px;
margin-bottom:5px;
}
.sf_extra12 {
display:none;
}
.sf_region7 {
float:left;
margin-left:-962px;
width:204px;
display:none;
}
.sf_region8 {
float:left;
margin-left:-212px;
width:204px;
display:none;
}
.sf_extra8 {
clear:both;
}
/**
* @subsection footer
*/
.sf_region10 {
font-size:10px;
text-align:center;
clear:both;
}
.sf_footer {
margin:5px 0px 20px;
}
.sf_banner {
margin:10px 0px;
}
.sf_banner #bannerImage {
padding:5px;
}
/**
* @subsection buttons
*/
.btn {
font-size: 10px;
font-family:Arial, Helvetica, FreeSans, sans-serif;
text-transform:uppercase;
font-weight: bold;
cursor: pointer;
margin: 3px 0;
padding: 2px 4px 3px;
}
/**
* ------------------------------------------------------------------
* @section WIDGETS
* ------------------------------------------------------------------
*/
.widgetset .widget {
padding:5px 4px;
margin-bottom:8px;
min-height:1%;
height:auto !important;
height:1%;
}
.widgetset .widget_header {
text-transform:uppercase;
font-weight:bold;
font-size:11px;
padding:5px 7px 6px;
margin:0px;
}
.widgetset .widget_header a:link,
.widgetset .widget_header a:visited,
.widgetset .widget_header a:hover{
text-decoration:none;
}
.widgetset .widget_content {
width:180px;
padding:10px 7px;
overflow:hidden;
}
.widgetset .HomeLink .widget_content {
margin:0px;
padding:0px;
}
.widgetset .widget_content ul,
.widgetset .widget_content ol {
margin:0px;
padding:0px;
list-style:none;
}
.widget li{
margin:0px;
padding:0px 0px 6px;
}
.widgetset label{
margin:0px;
padding:0px;
display:block;
}
.widgetset form{
margin:0px;
padding:0px;
}
.widgetset .form_item {
margin:0px;
padding:0px 0px 6px;
}


Here are the small amount of changes I made:
.sf_wrapper {
border:12px solid #000000;
background-color:#000000;
}
.sf_navigation {
border-top:2px solid #202020;
border-bottom:2px solid #202020;
}
.sf_navigation ul li a {
color:#789f92;
}
.sf_navigation ul li a:visited {
color:#789f92;
}
.sf_navigation ul li a:hover {
color:#789f92;
background-color:#333333;
}

.sf_navigation ul li a {
display: block;
margin:0px;
padding:6px 12px 7px;
text-decoration: none;
text-transform:uppercase;
font-size:14px;
font-weight:bold;
min-width:1%;
width: auto !important;
width:1%;
}
.sf_navigation .subnav li a {
color:#789f92;
background-color:#000000;
}
.sf_navigation .subnav li a:visited {
color:#789f92;
}
.sf_navigation .subnav li a:hover {
color:#789f92;
background-color:#333333;
}


/**
* @subsection content
*/
.sf_main {
border:6px solid #202020;
background-color:#111111;
}

Last edited by LadynRed; 08-11-2009 at 10:44 AM..
MajesticGlass is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-11-2009, 10:52 AM Re: Help with centering navigation using a sitebuilder
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
The nav list is floated to the left, so you're going to have to remove the float if you want the thing centered. You'll have to set the li to display: inline to make the list horizontal.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-11-2009, 12:15 PM Re: Help with centering navigation using a sitebuilder
Junior Talker

Posts: 2
Name: Joyce
Trades: 0
Thanks for replying. I changed out those codes but still can't get it to work. I totally removed the float and added in the display:inline since there wasn't one and it still isn't working. Here is what I changed the coding to:

.sf_navigation ul li {
display: inline;
list-style: none;
margin: 0;
padding: 0;
white-space: nowrap;
min-width:1%;
width: auto !important;
width:1%;
}

I even then tried a few other things and one time ended up with them all in a column instead.

What am I changing wronge? Do I leave the float in but change it to none or 0? Am I not placing the display:inline right? .... I see other displays within the nav codes, do I need to change any of those.

Thanks for your time.
MajesticGlass is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with centering navigation using a sitebuilder
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18041 seconds with 12 queries