Thursday, February 17, 2011

Rounded Corners

It was interesting to try and create rounded corners to display content in HTML. Since html5 is gaining popularity and css3 supports border-radius, I thought I should try to create something interesting for myself.

The code is below for page.
----------------------------

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RoundedCorners.aspx.cs"
Inherits="CoolUI.RoundedCorners" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

<script src="Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>

<link href="Styles/CoolUI.css" rel="stylesheet" type="text/css" />
<title></title>

<script type="text/javascript" language="javascript">
$(function() {
$('#divchi').mouseenter(function() {

$('#divpar').css("background-color", "#FF0000");
});

$('#divchi').mouseleave(function() {
$('#divpar').css("background-color", "#FFFFFF");
});
});


</script>

</head>
<body>
<form id="form1" runat="server">
<div id="divpar" class="divpar" style="height: 204px; width: 204px;">
<div id="divchi" class="divchi" style="height: 200px; width: 200px; position: relative;
top: 2px; left: 2px">
<table cellspacing="2" cellpadding="2" width="100%">
<tr>
<td>

<span class="spntitle">Welcome</span>
</td>
<td>
</td>
</tr>
<tr>
<td colspan="2" valign="top">
<p>
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis
egestas.Donec eu libero sit amet. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis
egestas.Donec eu libero sit amet. egestas.Donec eu libero sit amet ristique senectus et netus </p>
</td>
</tr>
<tr>
<td>
<span class="spnfoot">All right reserved.</span>
</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</form>
</body>
</html>

The ccs for the page is
--------------------------

body
{
background: #CCCCCC;
font-family: Verdana;
font-weight: lighter;
font-size: 11px;
}

.divpar
{
background-color: #FFFFFF;
border-radius: 8px 8px 8px 8px;
}
.spntitle
{
font-family: Verdana;
font-weight: lighter;
font-size: 12px;
color: #CCCCCC;
}

.spnfoot
{
font-family: Verdana;
font-weight: lighter;
font-size: 12px;
color: #CCCCCC;
}

.divchi
{
background-color: #FFFFFF;
border-radius: 8px 8px 8px 8px;
}



Testing it in different browsers

1. Google Chrome
------------------


2. Internet Explorer
--------------------


3. Mozilla Firefox
------------------

4. Opera
---------
When you hover your mouse over the content the
border gets highlighted.



Display in opera.


At the time of this article the browser versions are

1. IE 7.0
2. Opera 11.01
3. Firefox 3.6.13
4. Google Chrome 8.0.522.

Once css3 is completely supported in all the browser the display will be
uniform across browsers.

Till then have fun.



Monday, February 14, 2011

Test API from Web. APIGee

Today I was talking to one of my friend and he showed me the simplicity in APIGee.com. This has few free APIs to test.

An interesting find is that in HTML5 we can use canvas to display graphs and other interesting things.

Friday, January 28, 2011

HTML ipsum

While learning about jquery, I stumbled upon a new site called http://html-ipsum.com/. I used to goto lorem ipsum and copy code and then format it to my need. But this site already does a bunch of things for me. Check it out you wont be disappointed if you are a UI designer.

Wednesday, January 12, 2011

How to test you code in different IE version browsers at the same time.

Today, I have decided to learn jQuery. They got my new computer yesterday and I am very excited about the fact that I can learn UI again. After watching a couple of jQuery videos, It is more exciting to know that there is a tutorial called "jQuery for absolute beginners". While watching these videos, I found that the best tool to test your code in multiple IE version is "IETester." Played with it for a while and like it a lot.

Tuesday, January 11, 2011

Learning JQuery

Today I haves started to learn jQuery. Had been thinking for a while but, never was able to do some solid coding. A friend of mine refered me to this site. http://jsfiddle.net/


1. The best way to learn jQuery is download a cheat sheet, and understand the document.
2. Get Webdeveloper firefox extension and learn how to inspect elements.
3. Learn how to load jQuery to any page you are looking at. (It is little complicated. Goto to the link and bookmark it.

http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet)

Clicking on that link while viewing any page will inject jQuery in that page and you can use webDeveloper to inspect elements using JQuery.

4. Open JSFiddle and then create your own files.

Whatever be the learning curve, do the one that suits you.

Monday, January 10, 2011

Learning MVC2, Nerd Dinner.

Today, I have decided to learn MVC after leaving from Sogeti. Till yesterday it was very hectic trying to see what is crashing our server when we add 2 processors on a virtual machine. After multiple permutations and combinations of errors we couldn't resolve the issue.

Well While learning MCV2, I stumbled up 2 website that are funny.

http://www.sadtrombone.com/

and

http://instantrimshot.com/

These sounds could be used during presenation. It would be nice to see how the audience would react.

Monday, January 3, 2011

ASP.NET MVC Jquery Grid

http://haacked.com/archive/2009/04/14/using-jquery-grid-with-asp.net-mvc.aspx