![]() ![]() ![]() This is a huge boost for maintainability and scalability, so although I wouldn't say as far as saying it's good practice, it's certainly not bad practice as far as I'm concerned. In a Web API, a static method is one which is defined by an interface but can be called without instantiating an object of that type first. Specify your color, background color and highlights as classes and tag these classes to the required elements within your html directly. A static method (or static function) is a method defined as a member of an object but is accessible directly from an API objects constructor, rather than from an object instance created via the constructor. This is a good practice (although not for your case) when you want to specify a certain color scheme for your site. To add to this, erimerturk had a good idea of specifying highlights or 'themes' within your styles. Grouping the links together and handling this as a class would allow you to bold all the links if you have multiple menus. individually just as you would have a hover color on these links, you might as well want the link to be bold when the user is on that specific page. The most obvious benefit of this is that you will be able to handle the active links as a group vs. From my experience, I would specify each menu button as its own class in order to handle the group of links together (ie all links that directs the user to the About us page). In your case, as this is a navigation menu, you might have multiple menus (such as a left-side pane side bar, a footer menu aswell). ![]() A class should be used (as opposed to an ID) when there is even a possibility to group multiple elements together (for scripting, styling). It's not necessarily overkill specifying individual classes for each list item. This will then allow me to add the specific background images to each menu item. In the above example highlighted in red are the classes that have been added. In order to achieve this it will be ideal if specific classes could be added for example: I cannot add specific background images to the menu items as they all have the same class. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |