HTML Superscripts and Subscripts messes up line height

25. May 2008

I was recently updating a clients site by adding in some ® symbols as superscripts and subscripts. This resulted in some pretty nasty line heights as you can see below.

 

Lorem ipsum dolor sit amet, consectetuer adipiscing elit®. Aenean ac orci in neque consectetuer viverra.® In eu tellus ut felis posuere sollicitudin. Nunc id lectus. Fusce quis turpis. Praesent egestas nunc sit amet lorem. Aliquam erat volutpat. Ut felis leo, lacinia molestie, molestie vitae, porttitor et, dolor. Quisque diam erat, rutrum non, cursus at, tempus in, libero. Maecenas dignissim dolor ut nibh. Suspendisse rutrum aliquet felis. Vivamus mi. Donec aliquam imperdiet mauris.

 

I searched on Google and found a few methods to correct this issue. They worked fine in Firefox but not in IE 6 and sometimes 7.

After experimenting a bit, I found a way that corrects this issue with CSS and works in Firefox, Opera, Safari, IE 6 and 7.

 

Lorem ipsum dolor sit amet, consectetuer adipiscing elit®. Aenean ac orci in neque consectetuer viverra.® In eu tellus ut felis posuere sollicitudin. Nunc id lectus. Fusce quis turpis. Praesent egestas nunc sit amet lorem. Aliquam erat volutpat. Ut felis leo, lacinia molestie, molestie vitae, porttitor et, dolor. Quisque diam erat, rutrum non, cursus at, tempus in, libero. Maecenas dignissim dolor ut nibh. Suspendisse rutrum aliquet felis. Vivamus mi. Donec aliquam imperdiet mauris.

 

 

sup
{

    vertical-align: baseline;
    font-size: 0.8em;
    position: relative;
    top: -0.4em;
}

sub
{
    vertical-align: baseline;
    font-size: 0.8em;
    position: relative;
    bottom: -0.4em;
}

 

Just adjust the position and font size to suit your taste.

CSS

ASP.NET Flash Remoting

9. May 2008

If you are looking for information on a free ASP.NET Flash Remoting Solution you have come to the right place.

The Midnight Coders have a product called WebORB® that will meet all of your remoting , real-time messaging (RTMP) and Flex Data Services (AMF0 and AMF3, Data Management, Flex Messaging (pub/sub, push)) needs.

I have used this product's Flash Remotings features extensively on one of my clients sites and I highly recommend it to anyone looking for a Flash Remoting Solution even if they are not doing development in ASP.NET.  WebORB® also comes in Java, Ruby On Rails and PHP versions.

 

Installation

Installing WebORB® is extremely easy. Just copy its assemblies to your bin folder, copy a few files and folders to your web applications root directory and give a few of them write permissions. The final step is updating your web.config file with its HTTP Handlers.

If you install WebORB® on your server, you have the option of automatically deploying to to a virtual directory.  There seems to be 1 downfall, it appears that it can only be automatically installed to virtual directorys of your default web site. If you are on a server that is hosting multiple web sites, you should just do the manual install.

Using WebORB

One of WebORB's best abilities is that it will parse your Web Applications Assemblies and generate Action Script code for use in your flash movie or JavaScript for your AJAX functions. It can generate code in a variety of formats and styles: Flex Remoting / AS3, Flash Remoting / AS2, ARP Framework / AS2 or AS3, Cairngorm Framework, FlashComm / FMS2, AJAX Client and PureMVC.  It will generate code for anything that your functions  in your assembly returns. Objects, DataSets, strings  etc.

 

WebOrb

ASP.NET, Flash Remoting ,