Every time you are working on application it’s a must to have the basic functionality to highlight selected menu item. In HTML it’s not a problem to add certain class to the navigation tab to highlight current page menu tab:
<li class="selected"><a href="#">Home</a></li>
In MVC project you can dynamically set the active list item, based on the view that is being called. In other words, when the user is looking at the home page, the following HTML should be created:
<ul>
<li class="selected"><a href="#">Home</a></li>
<li><a href="#">Services</a></li>
</ul>
There are two ways to solve the issue even:
1. To do the above, I created MVC HTML helper class, containing method to apply my CSS class according to some conditions (MenuHelper.cs):
using System;
using System.Web.Mvc;
using System.Web.Mvc.Html;
namespace YourWebApplication.Helpers
{
/// <summary>
/// Menu current active item helper class.
/// </summary>
public static class MenuHelper
{
/// <summary>
/// Determines whether the specified controller is selected.
Once I got a weird trouble with submitting contact form.
My website was powered by WordPress and the contact form was placed at the default page (single page design), so I want the form to submit to the page itself that the form is on.
There are a few ways to setup WordPress pagination, or ‘paged’ links. I do prefer to work with paginate_links because of set of its arguments, which could be customized according to your needs.
As for my mind, tables are not to be used for layout. I do use tables are for lists of data. And at the age of responsive design they have to support responsibility.
Solution #1:
For the last time I work a lot with Bootstrap. There are a lot of pre-ready solutions, which help to save my time. Bootstrap framework proposes it’s own variant of responsive tables – you should wrap ‘table’ into ‘div’ element with .table-responsive class: