EOSERV Forum > Lounge > Centering a Navigation Bar -help-
Topic is locked.
Page: << 1 >>
Centering a Navigation Bar -help-
Author Message
Post #131752 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
Post #131753 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
Post #131754 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
Post #131755 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
Post #131756 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
Post #131757 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 &copy; in your footer.
---
Eat shit, bro.

I support Ephixa [http://ephixa.com/]. Fuck Skrillex, Sonny Moore is no more.
13 years, 11 weeks ago
Post #131763 Re: Centering a Navigation Bar -help-

Thanks, Divine. xD It worked.<3

---
i hate kody
13 years, 11 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Lounge > Centering a Navigation Bar -help-