A Wired.com user account lets you create, edit and comment on Webmonkey articles. You will also be able to contribute to the Wired How-To Wiki and comment on news stories at Wired.com.
It's fast and free.
processing...Retrieve Sign In
Please enter your e-mail address or username below. Your username and password will be sent to the e-mail address you provided us.
processing...Welcome to Webmonkey
- edit articles
- add to the code library
- design and write a tutorial
- comment on any Webmonkey article
Sign In Information Sent
Use CSS rules with AllWebMenus DHTML-JavaScript Menu Maker
/skill level/
/viewed/
Contents |
Introduction
Using CSS Rules with AllWebMenus.
What you'll need
AllWebMenus
Steps
Scripts generated by the AllWebMenus DHTML Menu Maker application create HTML| elements) in order to display the menu in your website.
Generic CSS rules that apply to all elements of a certain type (such as table) will also affect the elements created by the AllWebMenus' scripts. This can cause strange appearance of a menu. Here is an example: The original menu looks like this: CSS rules like the following: td { text-align: center; margin: 0.5em; font-size: 100%; color: black; padding-left: 10px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px } and tr { text-align: left; margin: auto; font-size: 100%; color: black; padding-left: 10px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px } will cause a menu to look like this: menu broken by css in css example Instead of the above rules, you can use classes and add these classes to the elements of the page you want the CSS rules to be applied: td.TDdefinition { text-align: center; margin: 0.5em; font-size: 100%; color: black; padding-left: 10px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px } and tr.TRdefinition { text-align: left; margin: auto; font-size: 100%; color: black; padding-left: 10px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px } and in the source code of your page you can use the following
Suggested readingshttp://www.likno.com/blog/using-css-rules-with-allwebmenus/252/ |
Special Offer For Webmonkey Users
WIRED magazine:
The first word on how technology is changing our world.
