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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Navigation Bar alignment problem!
Old 03-15-2007, 12:22 PM Navigation Bar alignment problem!
Junior Talker

Posts: 4
Trades: 0
On our company website (http://www.healthcomplex.biz), I had downloaded some code for our navigation bar a while back. For some reason, I can't adjust the code to center the bar (it positions to the left.) Any feedback in centering this bar would be greatly appreciated!

Thanks, Shriekhoe
Shriekhoe is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-15-2007, 12:56 PM Re: Navigation Bar alignment problem!
Banned

Posts: 905
Name: Travel Agent
Trades: 0
You forgot to place a "</center>" at the end of your javascript -- it's also wise to place your CSS in a separate file and get rid of your tables ... while you're at it, you need a mandatory <!DOCTYPE Declaration> at the beginning of your HTML, and correct the following code warnings:

Code:
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 60 column 738 - Warning: '<' + '/' + letter not allowed here
line 60 column 799 - Warning: '<' + '/' + letter not allowed here
line 96 column 226 - Warning: '<' + '/' + letter not allowed here
line 97 column 240 - Warning: '<' + '/' + letter not allowed here
line 99 column 228 - Warning: '<' + '/' + letter not allowed here
line 100 column 243 - Warning: '<' + '/' + letter not allowed here
line 123 column 18 - Warning: replacing <p> by <br>
line 123 column 18 - Warning: inserting implicit <br>
line 138 column 13 - Warning: replacing <p> by <br>
line 138 column 13 - Warning: inserting implicit <br>
line 228 column 48 - Warning: replacing <p> by <br>
line 228 column 48 - Warning: inserting implicit <br>
line 255 column 29 - Warning: unescaped & or unknown entity "&COPY"
line 58 column 12 - Warning: <script> inserting "type" attribute
line 108 column 1 - Warning: <table> proprietary attribute "height"
line 128 column 5 - Warning: <img> lacks "alt" attribute
line 191 column 1 - Warning: <table> proprietary attribute "height"
line 233 column 24 - Warning: <img> proprietary attribute "naturalsizeflag"
line 58 column 1 - Warning: trimming empty <p>
line 112 column 5 - Warning: trimming empty <p>
line 115 column 5 - Warning: trimming empty <p>
line 125 column 1 - Warning: trimming empty <p>
line 132 column 5 - Warning: trimming empty <p>
line 135 column 9 - Warning: trimming empty <p>
line 163 column 9 - Warning: trimming empty <p>
line 184 column 5 - Warning: trimming empty <p>
line 187 column 5 - Warning: trimming empty <p>
line 195 column 5 - Warning: trimming empty <p>
line 198 column 9 - Warning: trimming empty <p>
line 217 column 5 - Warning: trimming empty <p>
line 224 column 9 - Warning: trimming empty <p>
line 227 column 13 - Warning: trimming empty <p>
line 230 column 13 - Warning: trimming empty <p>
line 233 column 13 - Warning: trimming empty <p>
line 245 column 5 - Warning: trimming empty <p>
line 251 column 5 - Warning: trimming empty <p>
line 268 column 5 - Warning: trimming empty <p>
travelagent is offline
Reply With Quote
View Public Profile
 
Old 03-15-2007, 01:48 PM Re: Navigation Bar alignment problem!
Junior Talker

Posts: 4
Trades: 0
Thanks for your reply! I tried placing a "</center>" at the end of the JAVA, but it didn't help. I'm trying to shift the entire bar to the center. I have the text centered OK, but the absolute positioning of the bar is what's giving me a problem.

Thanks again, Shriekhoe
Shriekhoe is offline
Reply With Quote
View Public Profile
 
Old 03-15-2007, 02:10 PM Re: Navigation Bar alignment problem!
Banned

Posts: 905
Name: Travel Agent
Trades: 0
You don't have any absolute positioning in your CSS code at all and you haven't placed the end tag on your javascript yet -- here's what I'm talking about, and I've bolded it for you:

<CENTER><script language="JavaScript"><!--//
var D6=window,Y7=document;function B8(){this.ver=navigator.appVersion;this.agent=navi gator.userAgent;this.dom=Y7.getElementById?1:0;thi s.opera5=this.agent.indexOf("Opera 5")>-1;this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom &&
!this.opera5)?1:0;this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;this.ie4=(Y7.all && !this.dom && !this.opera5)?1:0;this.ie=this.ie4||this.ie5||this .ie6||this.ie7;this.mac=this.agent.indexOf("Mac")>-1;this.ns6=(this.dom && parseInt(this.ver)>=5)?1:0;this.ns4=(Y7.layers && !this.dom)?1:0;this.bw=( this.ie7||this.ie6||this.ie5||this.ie4||this.ns4|| this.ns6||this.opera5);return this}bw=new B8();z=0;b=0;g="";if(bw.opera5||bw.ns6){b=2};if(bw .ie){g=" style='width: 100%'"}else{z=6}mt=10;ml=10;w=150;mh=23;mw=ml-w;k=1;mt=mt-z;p="<a class='mi'"+g+" href='";q="' title='";r="\"; return true' onmouseout='window.status=\"\"; return true'>";t="</a>";a="' onmouseover='window.status=\"";v="<div class=sp></div>"
m=new Array();n=new Array();s=new Array();sw=new Array();su=new Array();st=new Array()
m[0]='About The Company';n[0]='#';sw[0]=150;su[0]='About The Company';st[0]="";s[0]=""
+p+"http://www.healthcomplex.biz/index.html"+q+a+"Home Page"+r+"Home Page"+t
+p+"http://www.healthcomplex.biz/staff-meet.html"+q+a+"Meet The Staff"+r+"Meet The Staff"+t
+p+"http://www.healthcomplex.biz/tour-facility.html"+q+a+"Tour The Facility"+r+"Tour The Facility"+t
+p+"http://www.healthcomplex.biz/insurance.html"+q+a+"Participating Health Plans"+r+"Participating Health Plans"+t
+p+"http://www.healthcomplex.biz/staff-clinical.html"+q+a+"Clinical Staff"+r+"Clinical Staff"+t
+p+"http://www.healthcomplex.biz/customer-service.html"+q+a+"Customer Service"+r+"Customer Service"+t
+p+"http://www.healthcomplex.biz/testimonials.html"+q+a+"Testimonials"+r+"Testimoni als"+t
+p+"http://www.healthcomplex.biz/employment.html"+q+a+"Employment Opportunities"+r+"Employment Opportunities"+t
+p+"http://www.healthcomplex.biz/employees-password.html"+q+a+"Employees Page"+r+"Employees Page"+t
m[1]='Products & Services';n[1]='#';sw[1]=150;su[1]='Products & Services';st[1]="";s[1]=""
+p+"http://www.healthcomplex.biz/respiratory.html"+q+a+"Oxygen & Respiratory Care Services"+r+"Oxygen & Respiratory Care Services"+t
+p+"http://www.healthcomplex.biz/homefill.html"+q+a+"HomeFill Portable Oxygen System"+r+"HomeFill Portable Oxygen System"+t
+p+"http://www.healthcomplex.biz/cpap.html"+q+a+"Sleep Program: CPAP & Bi-Level Therapy"+r+"Sleep Program: CPAP & Bi-Level Therapy"+t
+p+"http://www.healthcomplex.biz/medical.html"+q+a+"Home Durable Medical Equipment"+r+"Home Durable Medical Equipment"+t
+p+"http://www.healthcomplex.biz/nebulizers.html"+q+a+"Nebulizers & Unit Dose Medications"+r+"Nebulizers & Unit Dose Medications"+t
+p+"http://www.healthcomplex.biz/enteral.html"+q+a+"Enteral Nutrition Program"+r+"Enteral Nutrition Program"+t
m[2]='Support & Information';n[2]='#';sw[2]=150;su[2]='Support & Information';st[2]="";s[2]=""
+p+"http://www.healthcomplex.biz/patient-education.html"+q+a+"Caring for the Oxygen Patient at Home"+r+"Caring for the Oxygen Patient at Home"+t
+p+"http://www.healthcomplex.biz/patient-education2.html"+q+a+"CPAP Maintenance and your Health"+r+"CPAP Maintenance and your Health"+t
+p+"http://www.healthcomplex.biz/patient-education3.html"+q+a+"Common CPAP Myths"+r+"Common CPAP Myths"+t
+p+"http://www.healthcomplex.biz/clinical-support.html"+q+a+"Medicare CPAP Coverage Guidelines"+r+"Medicare CPAP Coverage Guidelines"+t
+p+"http://www.healthcomplex.biz/clinical-support2.html"+q+a+"Medicare Oxygen Coverage Guidelines"+r+"Medicare Oxygen Coverage Guidelines"+t
+p+"http://www.healthcomplex.biz/clinical-support3.html"+q+a+"Medicare Enteral Coverage Guidelines"+r+"Medicare Enteral Coverage Guidelines"+t
+p+"http://www.healthcomplex.biz/hipaa.html"+q+a+"HIPAA"+r+"HIPAA"+t
m[3]='News & Upcoming Events';n[3]='#';sw[3]=150;su[3]='News & Upcoming Events';st[3]="";s[3]=""
+p+"http://www.healthcomplex.biz/news.html"+q+a+"News"+r+"News"+t
+p+"http://www.healthcomplex.biz/coming-soon.html"+q+a+"Better Breathers"+r+"Better Breathers"+t
m[4]='Links & Contact';n[4]='#';sw[4]=150;su[4]='Links & Contact';st[4]="";s[4]=""
+p+"http://www.healthcomplex.biz/links.html"+q+a+"Links"+r+"Links"+t
+p+"http://www.healthcomplex.biz/directions.html"+q+a+"Directions to our Facility"+r+"Directions to our Facility"+t
+p+"http://www.healthcomplex.biz/contact.html"+q+a+"Contact Us"+r+"Contact Us"+t
ma=m.length
if (k==1) {mw2=ml-w;
for (i=0; i < ma; i++){document.write("<div id='sb"+i+"' class='mn' style='position: absolute; top:"+(mt+mh)+";left:"+(mw+=w+2)+";width:"+(sw[i]-b)+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'>"+s[i]+"</div>")}
for (i=0; i < ma; i++){document.write("<div style='position: absolute; top:"+mt+";left:"+(mw2+=w+2)+";width:"+w+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'><a class='bi'"+g+" href='"+n[i]+q+st[i]+a+su[i]+r+m[i]+t+"</div>")}}
else {mw2=mt-mh;mt2=mt-mh+2
for (i=0; i < ma; i++){document.write("<div id='sb"+i+"' class='mn' style='position: absolute; top:"+(mt2+=(mh+1))+";left:"+(ml+w-10)+";width:"+sw[i]+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'>"+s[i]+"</div>")}
for (i=0; i < ma; i++){document.write("<div style='position: absolute; top:"+(mw2+=(mh+1))+";left:"+ml+";width:"+w+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'><a class='bi'"+g+" href='"+n[i]+q+st[i]+a+su[i]+r+m[i]+t+"</div>")}}
function lib_obj(obj,nest){nest=(!nest) ? "":'document.'+nest+'.';this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;this.css=bw.dom||bw.ie4?this.evnt.style:th is.evnt;this.ref=bw.dom||bw.ie4?document:this.css. document;this.x=parseInt(this.css.left)||this.css. pixelLeft||this.evnt.offsetLeft||0;this.y=parseInt (this.css.top)||this.css.pixelTop||this.evnt.offse tTop||0;return this}
function lib_doc_size(){this.x=0;this.x2=bw.ie && document.body.offsetWidth-20||innerWidth||0;this.y=0;this.y2=bw.ie && document.body.offsetHeight-5||innerHeight||0;this.x50=this.x2/2;this.y50=this.y2/2;return this;}
lib_obj.prototype.showIt = function(){this.css.visibility="visible"}
lib_obj.prototype.hideIt = function(){this.css.visibility="hidden"}
function libinit(){page=new lib_doc_size();o=new Array();for (i=0; i < ma; i++){o[i]=new lib_obj('sb'+i);o[i].hideIt()}}
libinit()
//--></script></center>
travelagent is offline
Reply With Quote
View Public Profile
 
Old 03-15-2007, 02:16 PM Re: Navigation Bar alignment problem!
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
but the absolute positioning of the bar is what's giving me a problem.
Well.. duuuhhh...

Wrap the menu elements in a floated div set to margin: 0 auto; and the thing should center. Position absolute means exactly what it says- absolutely stays where you tell it.

Beyond that.. that is one horrible mess of 1995 code going on there !
__________________
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 03-15-2007, 02:26 PM Re: Navigation Bar alignment problem!
Banned

Posts: 905
Name: Travel Agent
Trades: 0
LOL - that was my next step; shoulda seen how fast I jumped back when I looked at all of that code!
travelagent is offline
Reply With Quote
View Public Profile
 
Old 03-15-2007, 02:57 PM Re: Navigation Bar alignment problem!
Junior Talker

Posts: 4
Trades: 0
Thanks for the feedback, I'm an amateur web desigener for sure trying to get our company online!

Most of my page is constructed with copy/past codes. Not sure how to get that absolute center into the CSS code? Which code is worse, the entire page, or the nav bar?

Thanks again for the feedback!

Last edited by Shriekhoe; 03-15-2007 at 03:00 PM..
Shriekhoe is offline
Reply With Quote
View Public Profile
 
Old 03-15-2007, 03:15 PM Re: Navigation Bar alignment problem!
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quite frankly, the entire thing is a fright. Tables, <font> tags, <center> tags, ugh. The background tiling is terrible. All that javascript is not going to help you with the search engines either. I see you're using Adobe PageMill.. no wonder your code is a mess.

Your page is just a linear scroll.. reminiscent of sites from 10 years ago.

Might I suggest choosing a non-tables-based layout, and actually presenting your products in a much nicer and friendlier format. You can find some basic template layouts here:
http://csstinderbox.raykonline.com/
All free.. no graphics, just nice clean code. Choose a layout format and add your content.
__________________
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 03-15-2007, 03:24 PM Re: Navigation Bar alignment problem!
Junior Talker

Posts: 4
Trades: 0
Thanks for the link, looks like my whole site is in need of revamping! I will look into using one of those templates.

Until I have it ready to switch over, can you provide any direction for adjusting the nav bar to the center? I wasn't sure where to enter the "wrap"? Thanks in advance for any suggestions!

Last edited by Shriekhoe; 03-15-2007 at 03:32 PM..
Shriekhoe is offline
Reply With Quote
View Public Profile
 
Old 03-15-2007, 04:08 PM Re: Navigation Bar alignment problem!
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
I really can't, that whole thing is generated in the javascript !
__________________
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
 
Reply     « Reply to Navigation Bar alignment problem!
 

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.32881 seconds with 12 queries