Category: Html

All the html related posts.

W

Wrap text through CSS

Wrapping text through CSS is quite a necessary evil when your Analyst come up with jargons that stretches 15-20 charactors... 😉 So here's the deal. If you need to wrap text through CSS, you can use the CSS selector defined below: Wrap words through CSS /* In CSS */ .wrapword{  white-space: -moz-pre-wrap !important;  /* Mozilla, ...

H

HTML 5: Part 1 – Getting Started

Hola Amigos! Before i work with the elephant in the room; lemme tell you HTML 5 specs aint REC ready (Candidate Recommendation - W3C stage for stamping the spec to be ready for use). If Apple dint care waiting for 802.11g spec to stabilize for use in their products...then why should we.. 😉 ..jsssst kidding ...

W

When Microsoft or Google CDN fails, what should u do?

// Let me tell you one thing, an outage in CDN is very rare. But just in case you don't want to take a risk, go ahead with this fallback mechanism, as suggested by Scott Guru. Microsoft CDN outage for jQuery: <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"></script> <script type="text/javascript"> if (typeof jQuery == 'undefined') { document.write(unescape("%3Cscript src='/Scripts/jquery-1.4.2.min.js' type='text/javascript'%3E%3C/script%3E")); ...

j

jQuery noConflict Tips

Some tips which i feel you need to know before using jQuery library: 1. You can use jQuery instead of $. 2. Predefined alias for jQuery: you can assign jQuery to any variable. With this you can load any versions of jQuery into your site. <!-- load jQuery 1.1.3 --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.1.3.js"></script> <script type="text/javascript" ...

M

Maintain scroll position on postback for gridview or div

Problem Statement: There can be scenarios wherein your end users would appreciate to see the screen intact even after postback. In ASP .Net we use the MaintainScrollOnPostback property for the page to handle the page's scroll position. But this will not handle the case when you have gridviews wrapped in divs and having a scroll ...

H

Horizontal Scrollbar for ASP Listbox or HTML selectbox

Problem Statement: A normal listbox or ASP Listbox for that matter has an issue with the scroll. They have vertical scroll by default with them. However when it comes to horizontal scroll, they choke. Even if we specify a width for the listbox and give a lengthy option in the listbox content, you cant expect ...

j

jQuery Integration with BlogEngine.Net

Let me make it simple and easy to understand: Step 1 : Load the jquery script file, as below: <script src="/js.axd?path=script/jquery-1.3.2.min.js" type="text/javascript"></script> Step 2 : Copy the jquery script to a folder named script inside the theme folder. Step 3 : Register jquery it the site head, as below: <script type="text/javascript"> $j = jQuery.noConflict(); $j(document).ready(function() ...

T

Third party tool styles overriding my styles?

You might come across this scenario wherein, you want to override a css class of a third party add-in, but still not able to apply your styles. Well the reason is nothing but the concept of cascading coming into play. In this case, your third party selectors have the higher precedence over your site stylesheet. ...

C

Concept of cascading in CSS

Most of us know that Cascaded Style Sheet abbreviates to CSS . But why is it called so? What is the cascading happening out in the stylesheet. Well the concept is pretty simple, but powerful. You might come across scenarios wherein, you want to override a css class of a third party add-in, but still ...

C

CSS shortcuts

Using shortcuts in css, makes your CSS look neat, clean and compressed. It should be always taken into account that, you cannot simply play around with shortcuts. Different browsers, behave differently to the shortcuts. Following are some of the simple and effective shortcuts that i use in my css: Using Zeros :You need not mention ...