Belac

Joined: 29th Jan 2012
Posts: 249
Centering a Navigation Bar -help-
I'm trying to make a site in XHTML&CSS, and Javascrip (& soon HTML5), and I made a navigation bar and can't seem to get it centered. I Google'd lots of codes and none of them worked.
Here's what it looks like:

The code for the website is >here< and the code for the stylesheet is >here< if anyone wants to help me.
---
i hate kody
13 years, 11 weeks ago
|
Divine

Joined: 10th Apr 2009
Posts: 725
Re: Centering a Navigation Bar -help-
<div style="margin: auto;"> {nav bar} </div>
and kill the float:left; on the hyperlinks...
---
Eat shit, bro.
I support Ephixa [http://ephixa.com/]. Fuck Skrillex, Sonny Moore is no more.
13 years, 11 weeks ago
|
Dough

Joined: 21st Oct 2010
Posts: 535
Re: Centering a Navigation Bar -help-
Divine posted: (19th Feb 2012, 02:47 pm)
<div style="margin: auto;"> {nav bar} </div>
and kill the float:left; on the hyperlinks...
or just <div align="center"> - nav bar here - </div> XD
@edit: change it:
FROM: <div id="navigationbar">
TO: <div id="navigationbar" align="center">
13 years, 11 weeks ago
|
Divine

Joined: 10th Apr 2009
Posts: 725
Re: Centering a Navigation Bar -help-
Dough posted: (19th Feb 2012, 02:49 pm)
Divine posted: (19th Feb 2012, 02:47 pm)
<div style="margin: auto;"> {nav bar} </div>
and kill the float:left; on the hyperlinks...
or just <div align="center"> - nav bar here - </div> XD
@edit: change it:
FROM: <div id="navigationbar">
TO: <div id="navigationbar" align="center">
same thing just one uses html the other uses css...? lol.
---
Eat shit, bro.
I support Ephixa [http://ephixa.com/]. Fuck Skrillex, Sonny Moore is no more.
13 years, 11 weeks ago
|
Dough

Joined: 21st Oct 2010
Posts: 535
Re: Centering a Navigation Bar -help-
Divine posted: (19th Feb 2012, 02:53 pm)
Dough posted: (19th Feb 2012, 02:49 pm)
Divine posted: (19th Feb 2012, 02:47 pm)
<div style="margin: auto;"> {nav bar} </div>
and kill the float:left; on the hyperlinks...
or just <div align="center"> - nav bar here - </div> XD
@edit: change it:
FROM: <div id="navigationbar">
TO: <div id="navigationbar" align="center">
same thing just one uses html the other uses css...? lol.
yea. there's also 'text-align: center;'
13 years, 11 weeks ago
|
Divine

Joined: 10th Apr 2009
Posts: 725
Re: Centering a Navigation Bar -help-
Dough posted: (19th Feb 2012, 02:54 pm)
Divine posted: (19th Feb 2012, 02:53 pm)
Dough posted: (19th Feb 2012, 02:49 pm)
Divine posted: (19th Feb 2012, 02:47 pm)
<div style="margin: auto;"> {nav bar} </div>
and kill the float:left; on the hyperlinks...
or just <div align="center"> - nav bar here - </div> XD
@edit: change it:
FROM: <div id="navigationbar">
TO: <div id="navigationbar" align="center">
same thing just one uses html the other uses css...? lol.
yea. there's also 'text-align: center;'
I'm still pretty sure all he really needs is to take out the float left, he already has auto margins.. xD'
edit: nevermind, I'm off my game today xP. Here I fixed it: http://pastebin.com/etuds7QX
edit2: btw change the (c) for © in your footer.
---
Eat shit, bro.
I support Ephixa [http://ephixa.com/]. Fuck Skrillex, Sonny Moore is no more.
13 years, 11 weeks ago
|
Belac

Joined: 29th Jan 2012
Posts: 249
Re: Centering a Navigation Bar -help-
Thanks, Divine. xD It worked.<3 ---
i hate kody
13 years, 11 weeks ago
| | | | | | | |