December 22, 2010

CSS 3.0 Features & Generator

While the the W3C seem to be taking forever to implement new web standards and seem happy sitting on their butts forever without moving forward. Here are a bunch of CSS 3.0 proposals that Web Designers would go nuts over if ever they are implemented. I give them time till 2999 to implement them, at the rate things are going in the W3C. I saw the original post here on anieto2k blog but since I don’t understand what language it is written in, I decided to translate it. By the way Opera 9.5 has full support for CSS 3.0

Multi Columns

Currently when you create a multi columned layout i.e 2 column or 3 column layout you need to specify individual and separate DIV HTML elements to achieve the desired effect. But in CSS 3.0 you can achieve this with a single CSS declaration like this



DIV {width: 400px;column-count: 4;

column-width: 100px;

column-gap: 10px;column-rule: none;

}

This is actually possible in FireFox but it is not Standard CSS 3.0 you’ll need to use FireFox Specify code in your CSS to achieve the effect. Example is given below.

-moz-column-count: 3;

-moz-column-gap: 1em;

-webkit-column-count: 3;

-webkit-column-gap: 1em;

Multi-Background

Currently it is not possible to put multiple background Images to the same HTML element but in CSS 3.0 you can easily do this.



background: url('http://www.clazh.com/images/body-top.gif')

top left no-repeat,

url('http://www.clazh.com/images/banner_fresco.jpg')

top 11px no-repeat,

url('http://www.clazh.com/images/body-bottom.gif')

bottom left no-repeat,

url('http://www.clazh.com/images/body-middle.gif')

left repeat-y;

Zebra Tables

You can easily do zebra table without the need for JavaScript or putting CSS Classes on individual Table Rows to give alternate colours.

tr:nth-child(2n+1) /* represents every odd row of a HTML table */;

tr:nth-child(odd) /* same */

tr:nth-child(2n) /* represents every even row of a HTML table */

tr:nth-child(even) /* same *//* Alternate paragraph colours in CSS */

p:nth-child(4n+1) { color: navy; }

p:nth-child(4n+2) { color: green; }

p:nth-child(4n+3) { color: maroon; }

p:nth-child(4n+4) { color: purple; }

Rounded Corners

How about the ability to render the ever popular and so called Web 2.0 rounded Corners for a box(html Element) with just a single line of CSS.

-webkit-border-radius: 5px;

-moz-border-radius: 5px;

-khtml-border-radius: 5px;

border-radius: 5px;

Opacity

Currently almost all browsers support their own version and syntax for opacity. Here is the CSS 3.0 Standard code for opacity

/* IE 8 */

-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";

/* IE 5-7 */

filter: alpha(opacity=50);

/* Netscape */

-moz-opacity: 0.5;

/* Safari 1.x */

-khtml-opacity: 0.5;

/* Good browsers */

opacity: 0.5;

Resize

Ability to resize a HTML Element automatically

div.resize {width: 100px;

height: 100px;

border: 1px solid;

resize: both;

overflow: auto;

}

Text Effects

Text effects like drop shadow and Text Overflow.

color: #fff;background-color: #fff;

text-shadow: 2px 2px 2px #000;

text-overflow: ellipsis-word;

For more visit: www.cssgenerator.com


Enjoy :)

June 8, 2010

Changing UI Element Of iPhone

Most of you know that i pretty much don’t like iPhone themes, and that is because
1. Most of them are butt-ugly.
2. The ones i like, takes too much RAM and I prefer having my iPhone theme free. I got to admit though, that lately I’m flirting with a slightly modified version of GT theme found in Cydia store.

Well it seems I’m not the only “theme hater” out there, but sometimes there is the desire to customize the look and feel of your iPhone. That’s one of the benefits that comes once you jailbreak your iDevice , right? You still can customize every single UI element of your iDevice, without having to install any theme. If you have some badass graphics , all you need to do is to SSH into your iDevice, and replace the original files.
NOTE: backup everything
NOTE: be aware that some graphics may not be changed back to the original state. If that is the case, your only option is to restore your iDevice..
LockScreen
• Unlock Text – /System/Library/Frameworks/TelephonyUI.framework/bottombarlocktextmask.png
• Slider Bar – System/Library/Frameworks/TelephonyUI.framework/bottombarknobgray.png
Battery Charging Screen
• Battery Background – /System/Library/CoreServices/SpringBoard.app/BatteryBG_1.png-BatteryBG_17.png
SpringBoard
• Calculator Icon – /Applications/Calculator.app/icon.png
• Maps Icon – /Applications/Maps.app/icon.png
• Calendar Icon – /Applications/MobileCal.app/icon.png
• Mail Icon – /Applications/MobileMail.app/icon.png
• iPod Icon – /Applications/MobileMusicPlayer.app/icon.png
• Notes Icon – /Applications/MobileNotes.app/icon.png
• Phone Icon – /Applications/MobilePhone.app/icon.png
• SMS Icon – /Applications/MobileSMS.app/icon.png
• Safari Icon – /Applications/MobileSafari.app/icon.png
• Camera Icon – /Applications/MobileSlideShow.app/icon-Camera.png
• Photos Icon – /Applications/MobileSlideShow.app/icon-Photos.png
• Clock Icon – /Applications/MobileTimer.app/icon.png
• Settings Icon – /Applications/Preferences.app/icon.png
• Stocks Icon – /Applications/Stocks.app/icon.png
• Weather Icon – /Applications/Weather.app/icon.png
• YouTube Icon – /Applications/YouTube.app/icon.png
• Dock – /System/Library/CoreServices/SpringBoard.app/SBDockBG2.png
General
• Ringer background when you use volume keys – /System/Library/CoreServices/SpringBoard.app/hud.png
• Badge (alert bubble for calls, sms, etc.) – /System/Library/CoreServices/SpringBoard.app/SBBadgeBG.png
• Top info bar – /System/Library/CoreServices/SpringBoard.app/FST_BG.png
Carrier Logo ( more details here )
• Lighter one – /System/Library/CoreServices/SpringBoard.app/FSO_CARRIER_ATT.png
• Darker one – /System/Library/CoreServices/SpringBoard.app/Default_CARRIER_ATT.png
Signal Strength
• /System/Library/CoreServices/SpringBoard.app/FSO_0_Bars.png-FSO_5_Bars.png
• /System/Library/CoreServices/SpringBoard.app/Default_0_Bars.png-Default_5_Bars.png
WiFi Bars
• /System/Library/CoreServices/SpringBoard.app/FSO_0_AirPort.png
• /System/Library/CoreServices/SpringBoard.app/FSO_1_AirPort.png
• /System/Library/CoreServices/SpringBoard.app/FSO_2_AirPort.png
• /System/Library/CoreServices/SpringBoard.app/FSO_3_AirPort.png
• /System/Library/CoreServices/SpringBoard.app/Default_0_AirPort.png
• /System/Library/CoreServices/SpringBoard.app/Default_1_AirPort.png
• /System/Library/CoreServices/SpringBoard.app/Default_2_AirPort.png
• /System/Library/CoreServices/SpringBoard.app/Default_3_AirPort.png
Power on Screen
• Logo – /System/Library/CoreServices/SpringBoard.app/applelogo.png
Power Off Screen
• Power off slider – System/Library/Frameworks/TelephonyUI.framework/bottombarknobred.png
Calculator
• Background – /Applications/Calculator.app/CalculatorBackground.png
• Screen Background – /Applications/Calculator.app/LCDBackground.png
iPod
• Rating Stars – /Applications/MobileMusicPlayer.app/star_filled.png
Phone
• Keypad – /Applications/MobilePhone.app/BarDialer_Sel.png
SMS
• Input Field (Bubble where you type you’re text message) – /Applications/MobileSMS.app/BalloonInputField.png
• Balloon 1 (Bubble where sent text messages are) – /Applications/MobileSMS.app/Balloon_1.png
• Balloon 2 (Bubble where received text messages are) – /Applications/MobileSMS.app/Balloon_2.png
• Bottom Bar Background (Background behing the text input field) – /Applications/MobileSMS.app/MessageEntryBG.png
Safari
• URL Bar (Idle) – /Applications/MobileSafari.app/Url.png
• URL Bar (Inactive) – /Applications/MobileSafari.app/UrlInactive.png
• URL Bar (Active) – /Applications/MobileSafari.app/UrlProgress.png
Mail
• Trashcan – /System/Library/PreferenceBundles/MobileMailSettings/trashmbox.png
Other
• Bluetooth – /System/Library/CoreServices/SpringBoard.app/FSO_Bluetooth.png
• Background bar color HomeScreen – /System/Library/CoreServices/SpringBoard.app/FSO_BG.png
• Background bar color Lock mode – /System/Library/CoreServices/SpringBoard.app/FST_BG.png
• Background bar color for all other screens (Text, Safari, Mail, etc.) – /System/Library/CoreServices/SpringBoard.app/default_BG.png
• Window (including status bar) 320 x 480px
• Status Bar 20 px
• View inside window (visible status bar) 320 x 460
• Navigation Bar 44 px
• Nav Bar Image / Toolbar Image up to 20 x 20 px (transparent PNG)
• Tab Bar 49 px
• Tab Bar Icon up to 30 x 30 px (transparent PNGs)
• Text Field 31 px
• Height of a view inside a navigation bar 416 px
• Height of a view inside a tab bar 411 px
• Height of a view inside a navbar and a tab bar 367 px
• Portrait Keyboard height 216 px
• Landscape Keyboard height 140 px
• iPhone app icon size 57×57 px