|
|
|
|
Thread title: css/list -navigationbar |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
03-03-2008, 08:14 PM
|
#1
|
Status: Member
Join date: Feb 2008
Location: Norway
Expertise:
Software:
Posts: 101
|
css/list -navigationbar
Hi!
I have a site: Here
I have some problems with my css/list navigationbar (the left, vertical).
I want a second level, which I've given the class "2" and the css-code:
.list_container .2 a {
text-align: center;
font-size: 12px;
font-weight: normal; }
|
In my dreamweaver window it's nice, but in Firefox and IE it doesn't show.
How should I write my css-code to get it right?
Thanks!
|
|
03-03-2008, 08:29 PM
|
#2
|
Status: Member
Join date: Jan 2005
Location: Canada
Expertise:
Software:
Posts: 157
|
I don't see what you are trying to do? Also why is it
.list_container .2 a {
Why is there a period (.2)?
- Steve
|
|
03-03-2008, 08:47 PM
|
#3
|
Status: #pugs {display: block;}
Join date: Jan 2007
Location: Chicago
Expertise: CSS, HTML, PHP
Software: Sublime Text 2
Posts: 1,187
|
|
|
03-03-2008, 11:31 PM
|
#4
|
Status: Junior Member
Join date: Feb 2008
Location: lost in sound
Expertise:
Software:
Posts: 40
|
Instead of having
Code:
.list_container .2 {
You could always use
Code:
.list_container-two a {
|
|
03-03-2008, 11:35 PM
|
#5
|
Status: I'm new around here
Join date: Mar 2008
Location: Charlotte, NC
Expertise:
Software:
Posts: 4
|
Try changing the class name of the indent to "two" rather than "2". Some browsers don't like class names that start with a number. Change that and let's see where you are at.
|
|
03-04-2008, 07:46 AM
|
#6
|
Status: Junior Member
Join date: Jan 2008
Location: Växjö, Sweden
Expertise:
Software:
Posts: 45
|
I would advise against using a class altogether and instead use a nested list. It makes more sense semantically. Just target ".list_container ul ul" to get the entire sub list.
Code:
<ul>
<li><a href="index.php">Hjem</a></li>
<li><a href="Marmeladeby/Marmeladeby.php">Marmeladeby</a></li>
<li><a href="Event/Event.php">Event</a></li>
<ul>
<li class="2"><a href="Teatersport.php">Teatersport</a></li>
<li class="2"><a href="Juletrefest.php">Juletrefest</a></li>
<li class="2"><a href="Grand_Prix_Show.php">Grand Prix Show</a></li>
</ul>
<li><a href="Kurs.php">Kurs</a></li>
<li><a href="Om_oss/Om_oss.php">Om oss </a> </li>
<li><a href="Om_oss/Kontakt.php">Kontakt</a></li>
</ul>
Also, you would do good to validate your document. It contains a whole bunch of errors right now and I think most could be avoided by correcting just one of them, the misplaced <body> tag at the bottom of the document.
|
|
03-04-2008, 10:19 AM
|
#7
|
Status: Member
Join date: Feb 2008
Location: Norway
Expertise:
Software:
Posts: 101
|
Thanks all!
I would advise against using a class altogether and instead use a nested list. It makes more sense semantically. Just target ".list_container ul ul" to get the entire sub list.
|
Thanks Szandor! That made everything look perfect!
Also, you would do good to validate your document. It contains a whole bunch of errors right now and I think most could be avoided by correcting just one of them, the misplaced <body> tag at the bottom of the document.
|
I'll start validation now. But I didn't see the misplaced <body> tag..
Ok, I got it. It was my footer, a php include document, that was with header and body. Removed those tags -and no errors..
Wonderful
Thanks!!
|
|
03-04-2008, 10:24 AM
|
#8
|
Status: Member
Join date: Feb 2008
Location: Norway
Expertise:
Software:
Posts: 101
|
Originally Posted by BetaOrge
I don't see what you are trying to do? Also why is it
.list_container .2 a {
Why is there a period (.2)?
- Steve
|
It was to classes .list_container and .2, but maybe not a good practice using the number..
|
|
03-05-2008, 06:19 AM
|
#9
|
Status: Waving
Join date: Aug 2005
Location:
Expertise:
Software:
Posts: 2,694
|
Originally Posted by G-Sun
It was to classes .list_container and .2, but maybe not a good practice using the number..
|
It's not even a practice, because it will never work.
|
|
03-08-2008, 04:28 AM
|
#10
|
Status: Junior Member
Join date: Feb 2008
Location: Raleigh, NC, USA
Expertise:
Software:
Posts: 34
|
I haven't been to the site, but I would use a nested list -with- a class.
That's a must.
Originally Posted by Szandor
I would advise against using a class altogether and instead use a nested list. It makes more sense semantically. Just target ".list_container ul ul" to get the entire sub list.
Code:
<ul>
<li><a href="index.php">Hjem</a></li>
<li><a href="Marmeladeby/Marmeladeby.php">Marmeladeby</a></li>
<li><a href="Event/Event.php">Event</a></li>
<ul>
<li class="2"><a href="Teatersport.php">Teatersport</a></li>
<li class="2"><a href="Juletrefest.php">Juletrefest</a></li>
<li class="2"><a href="Grand_Prix_Show.php">Grand Prix Show</a></li>
</ul>
<li><a href="Kurs.php">Kurs</a></li>
<li><a href="Om_oss/Om_oss.php">Om oss </a> </li>
<li><a href="Om_oss/Kontakt.php">Kontakt</a></li>
</ul>
Also, you would do good to validate your document. It contains a whole bunch of errors right now and I think most could be avoided by correcting just one of them, the misplaced <body> tag at the bottom of the document.
|
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|