close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to vary widths of 'Level 0' menu tabs?

Thread began 1/14/2010 7:10 pm by dev396590 | Last modified 1/18/2010 9:46 am by dev396590 | 1718 views | 4 replies |

dev396590

How to vary widths of 'Level 0' menu tabs?

Dear Friends,

First time working with CSS MenuWriter 2, and having little luck fitting a basic top nav tab menu in a 940px div. I need to make one tab, say 125px, another 225px, and so on...

I found the following fix in the forum, but it doesn't work:
<li><span><a href="index.html" style="width:50px;">Home</a></span></li>

Not being a PHP master doesn't help either, as this is code code generated in 'menu.php':
<li><a href="<?php echo($assumedRoot); ?>index.php">Home</a></li>

Is there a work-around for this, or did I miss something in the setup wizard?

Any help would be most appreciated! Thanks in advance.

Sign in to reply to this post

neilo

Hiya dev,

The 'style' part of the first example you gave is: style="width:50px;"

<li><span><a href="index.html" style="width:50px;">Home</a></span></li>


It should work fine if you place the inline style into the same relative format and position in the second example:

<li><a href="<?php echo($assumedRoot); ?>index.php" style="width:50px;>Home</a></li>


Inline styles supercede external stylesheets, so whatever styles you put in there should be effective.

The format is:

<someTag  ID=TheElementID  style="style-property:this_value;  style-property:this_value;" /> What ever content you are putting between the tags </ClosingTag>



This is quite a good place for finding stuff out

Sign in to reply to this post

dev396590

Thank you!

Hey Neilo,

Thank you very much! That did the trick! Although the closing " is needed ;-):
... style="width:50px; ...

One thing however, now the submenus do not line up properly. They vary between 10px-15px to the left of the 'Level 0' nav tab... in other words, the top tab and dropdown are not flush left (in this case)...

Any thoughts on how to control the location of just the 'Level 1' tabs?

Thanks again for your help, very much appreciated!

Sign in to reply to this post

neilo

Oops - yes, - am yet to post something without a typo.

In the menu.php again, you can specify that for individual elements by addiing an inline style to the ul class="level-1" element, using ' style="left:0px;" '

<ul class="level-1" style="left:0px;">


You can try different amounts, - minus numbers are also allowed: style="left:-10px;"

This property is set (or can be set) universally in the menu.css stylesheet:

ul#cssmw0 ul.level-1 {
left: 0px;
padding: 1px 0 0 0;
top: 100%;
}


So that you can set the property for the whole level-1 (level-2 etc) sub menu for all, and then specify inline styles for individual elements. So i suppose the right order would be to check that the ul.level-1bit in the menu.css stylesheet is set to 'left:0px' first, and then adjust the individual elements' inline styles second.

I thought that these could be set in the CSSMenuWriter GUI during the creating menu process - maybe they can - but I couldn't find it!

Sign in to reply to this post

dev396590

Thank you! Thank you! Thank you!

Hey Neilo,

Apologies for my delay in replying — your solution worked perfectly! Thank you so much for taking the time and effort to help. You've got some good karma coming your way, my friend ;-)

Thanks again!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...