Total newb with menu problem

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
zure
New Member
New Member
Posts: 2
Joined: Wed Aug 06, 2008 4:13 pm

Total newb with menu problem

Post by zure »

Hi all

New to this wonderful cms and programming in general. So please help. I tried already searching for a solution but not to avail :-[

What i'd like to do is to get my menu template to generate this kind of list with parent elements wrappwed in .. elements So output would look like this:

  HOME

      First
      Second

  CONTACT

      Address
      Form

And html like this:



HOME

  First
  Second

...


This menu could always stay open like that and desn't need to go deeper than first child of the parent. So a very basic menu. I tried to achieve this via css as well but the way I want it to look just needs those elements.

I'v gotten some so and so resuts myself but nothing closely resembling this. There must be an easy solution to this  ??? Please can someone point me to right direction here  ;D
Last edited by zure on Thu Aug 07, 2008 7:05 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Total newb with menu problem

Post by Dr.CSS »

You can do this w/o using h3...

li a {font-weight:bold; font-size: 2.5em} this can be adjusted to look like h3...

li li a {font-weight:normal; font-size: 1em}  this would be adjusted to match normal sizings...

It's easier to do this than to pick the first layer out of the menu and give it an h3...
zure
New Member
New Member
Posts: 2
Joined: Wed Aug 06, 2008 4:13 pm

Re: Total newb with menu problem

Post by zure »

Thanks for the answer

The ting im actualy trying to pull off is to put:

border-bottom: 1px dotted black;

On those parent items. So that it would go the entire widith of the 165px menu container. Doesn't seem to work on any of the default templates. The borders get all mixed up. But would work with those elements..  :)

Or maybe background image to simulate same effect would work? I'll have to try.

Terribly Sorry for not providing all the details in the first message  :-[
Last edited by zure on Thu Aug 07, 2008 3:46 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Total newb with menu problem

Post by Dr.CSS »

Well if you put something on the first li or a it will go to all others unless you tell it not to, hence the li li a call...
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm

Re: Total newb with menu problem

Post by Russ »

Plus it is not good semantics to use in menus or indeed very accessible. List are pretty good for menus and as Mark has pointed out very flexible!
dowoam
Forum Members
Forum Members
Posts: 25
Joined: Sat Mar 15, 2008 9:21 am

Re: Total newb with menu problem

Post by dowoam »

Hi zure,

I think, your html for the menu is wrong, to do the css like mark did it.
with
HOME
   
        .....
your main list element is not within the menu, it's just a normal h3 link.

To get a use of the css like

#div ul  {..}
#div li {..}
#div li a {...}
#div lil li a{..}
your menu shoul look like this:


   HOME
                 
                          first
                          second
               
 
   CONTACT
....


And remember, that the css is given to the next deeper level, unless you don't tell it different.

Exsample:
if you tell the ul color:red, the li elements will be all colored in red.
if you would like the child elements to be black, you have to overwrite the red color in the css for this elements.

And you have to say in the css, that you mean the link elements by a.


hope this will help you.

greetings

dirk
Last edited by dowoam on Sat Aug 09, 2008 10:55 am, edited 1 time in total.
Post Reply

Return to “Layout and Design (CSS & HTML)”