William Duffy

Glasgow Based ASP.NET Web Developer

Post archive for ‘HTML & CSS’

CSS class property in ASP.NET MVC HtmlAttributes

When adding an ActionLink or using a similar Html helper on your C# ASP.NET MVC views you will on occasions want to pass a css class via the htmlAttributes parameter. As this is normally achieved by creating an anonymous type you may expect the following code snippet to work.

1
<%= Html.ActionLink("My Link", "MyLink", null, new { [...]

Keep element in view while scrolling using jQuery

I’ve just completed an interesting project; an online application form that calculated a quote dynamically using Javascript as the user specified their choices.  The quote details where to be displayed to the right of the form, but the form was longer than the height of the page so scrolling was required. In order to keep [...]

Remove address bubble from Google Maps iframe

Something that always annoys me about the quick implementation of Google Maps is the rubbish address bubble that pops up on the auto generated iframe code. What makes it even more annoying is that you can remove the address bubble using Google’s neat little popup interface, but the customisation does not work. Nightmare!
Before I show [...]

Min-Height in Internet Explorer

Do you ever need to specify a min-height for an element on your site? You’ll know if you do that Internet Explorer does not play fair with it. Here is a nice, clean solution that you can use to get full browser support.