You Are Here Home > CSS

CSS

The Best Overall Code Editor Ever: Komodo Edit

A while back I wrote a post about what I think is the best Python code editor but I decided to write an update and write a little more about Komodo Edit…

I use Dreamweaver to write HTML/CSS/JavaScript/PHP code and a few days ago I decided to open Komodo Edit and see how it does with PHP.

I did try other editors for PHP but their support for HTML and CSS was lame and I’m so used to Dreamweaver’s comprehensive code completion features.

Well, I was surprised that Komodo Edit has all those features (& more) and handles PHP/CSS/HTML/JavaScript beatuifully, open a new PHP file and after ?> type:

<a

And then hit space, it will suggest everything Dreamweaver suggests and more! then write:

style=”

And again it will suggest every CSS property, then type:

:

It will suggest all the possible values, more than Dreamweaver…

The other thing is that it will show you function descriptions for all the functions and that could be very handy.

I have to say that I don’t know if I’m going to pay for Dreamweaver ever again and if you are looking for a free and excelent code editor, try Komodo Edit.

I have no affiliation with ActiveState and what I said above is my personal thoughts and ideas and an attempt to show this excellent/free/open-source product to others.

Happy Coding.

The Best Overall Code Editor Ever: Komodo Edit
Comments (1)   Filed under: CSS, HTML/XHTML, JavaScript, Komodo Edit, PHP, Web Design, Web Development   Posted by: Codehead

To Validate Or Not To Validate Your Markup

To be honest, I personally think that as long as my pages work fine and look the same on all the major browsers, I’m fine. But for me, it is also very important to properly balance all my tags and try to keep the pages as close to be valid as possible.

But here is something interesting, these are screenshots of my attempt to validate some of the major Internet players such is Google, Facebook, Twitter etc.

(Click on the images to see them in full size)

(You can try this tool here: http://validator.w3.org/)

It doesn’t look like these guys care either but at the end, it’s up to you to decide if it’s worth it for you to validate your markup and write perfect HTML/XHTML/CSS…

To Validate Or Not To Validate Your Markup
Comments (3)   Filed under: CSS, HTML/XHTML, Web Browsers, Web Design, Web Development   Posted by: Codehead

Rotate Text Using CSS

This is not a standard property yet but here it is:

.THE_TEXT_CLASS {
   filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE */
   -webkit-transform: rotate(-90deg);
   -moz-transform: rotate(-90deg);
   -o-transform: rotate(-90deg); /* Opera */
}

For now, it’s best if you use images instead…

Rotate Text Using CSS
Comments (0)   Filed under: CSS, HTML/XHTML, Web Design, Web Development   Posted by: Codehead

Enforce a Minimum Height For a Box

Here is the CSS:

.your-element {
   height: 500px;
   min-height: 500px;
   height: auto;
}

Of course, you might change 500px to whatever height you wish…

Enforce a Minimum Height For a Box
Comments (0)   Filed under: CSS   Posted by: Codehead

Multi Column Lists

Assuming that we want a 2 column list, here is the CSS:

ul#multi-column-list {
	width: 200px;
}
 
ul#multi-column-list li {
	width: 100px;
	float: left;
}

And HTML:

<ul id="multi-column-list">
   <li>Left</li>
   <li>Right</li>
   <li>Left</li>
   <li>Right</li>
   <li>Left Again</li>
   <li>Right Again</li>
</ul>

As you can see when the ul is 200pxs and lis are each 100pxs in width, your list will be arranged in 2 columns, so if you want to create a 4 column list, set the li’s width to 50px:

ul#multi-column-list {
	width: 200px;
}
 
ul#multi-column-list li {
	width: 50px;
	float: left;
}

HTML:

<ul id="multi-column-list">
   <li>1</li>
   <li>2</li>
   <li>3</li>
   <li>4</li>
   <li>1</li>
   <li>2</li>
   <li>3</li>
   <li>4</li>
</ul>
Multi Column Lists
Comments (0)   Filed under: CSS   Posted by: Hamid

Fluid 2 Column Layout – w Right Sidebar, Header & Footer

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fluid 2 Column - Right Sidebar</title>
 
   <style type="text/css">
		/**
		 * Please note: borders are just to show you the boundaries, you will probably want to remove prior to use unless you like them...
		**/
 
		#header {
			border: 1px solid #9900FF;
		}
 
		#side-bar {
			width: 200px;
			float: right;
			border: 1px solid #993300;
		}
 
		#contents {
			margin-right: 220px;
			border: 1px solid #0099FF;
		}
 
		#footer {
			border: 1px solid #669900;
		}
 
	</style>
 
</head>
 
<body>
 
   <div id="header">
   	Logo and menu here
   </div>
 
   <div id="side-bar">
   	I'm the side bar
   </div>
 
   <div id="contents">
   	Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec massa nibh, feugiat ut condimentum nec, ullamcorper nec ipsum. Cras vitae dolor nisl, ut scelerisque libero. Etiam nisi velit, pulvinar in volutpat posuere, venenatis nec justo. Curabitur imperdiet tellus tincidunt turpis venenatis a aliquet augue rutrum. Aliquam mattis lacus sed urna fringilla non pretium dolor sodales. Curabitur dapibus risus vitae libero dignissim et tristique enim ullamcorper. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum non magna ipsum. Nunc sem neque, scelerisque auctor sodales blandit, pretium sit amet quam. Duis sed turpis mi, a eleifend dui. Mauris pellentesque pretium tincidunt. Fusce sit amet massa quis dui ornare feugiat. Integer consequat purus et est tempus feugiat. Praesent a libero quis leo commodo blandit in at elit. Nunc faucibus sapien id magna vehicula ac pellentesque quam volutpat. Vivamus condimentum faucibus urna a molestie. Phasellus auctor arcu id enim feugiat porta. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
   </div>
 
   <div id="footer">
   	&copy;/sitemap stuff here
   </div>
 
</body>
</html>
 
<!--
  _            __             
 / )  _/'  _  /__)_ _ '  _  _ 
(__()(///)(/ / ( (-( //)(-_)  
         _/          /       
-->
Fluid 2 Column Layout – w Right Sidebar, Header & Footer
Comments (0)   Filed under: CSS   Posted by: Hamid

Fluid 2 Column Layout – w Left Sidebar, Header & Footer

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fluid 2 Column - Left Sidebar</title>
 
   <style type="text/css">
		/**
		 * Please note: borders are just to show you the boundaries, you will probably want to remove prior to use unless you like them...
		**/
 
		#header {
			border: 1px solid #9900FF;
		}
 
		#side-bar {
			width: 200px;
			float: left;
			border: 1px solid #993300;
		}
 
		#contents {
			margin-left: 220px;
			border: 1px solid #0099FF;
		}
 
		#footer {
			border: 1px solid #669900;
		}
 
	</style>
 
</head>
 
<body>
 
   <div id="header">
   	Logo and menu here
   </div>
 
   <div id="side-bar">
   	I'm the side bar
   </div>
 
   <div id="contents">
   	Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec massa nibh, feugiat ut condimentum nec, ullamcorper nec ipsum. Cras vitae dolor nisl, ut scelerisque libero. Etiam nisi velit, pulvinar in volutpat posuere, venenatis nec justo. Curabitur imperdiet tellus tincidunt turpis venenatis a aliquet augue rutrum. Aliquam mattis lacus sed urna fringilla non pretium dolor sodales. Curabitur dapibus risus vitae libero dignissim et tristique enim ullamcorper. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum non magna ipsum. Nunc sem neque, scelerisque auctor sodales blandit, pretium sit amet quam. Duis sed turpis mi, a eleifend dui. Mauris pellentesque pretium tincidunt. Fusce sit amet massa quis dui ornare feugiat. Integer consequat purus et est tempus feugiat. Praesent a libero quis leo commodo blandit in at elit. Nunc faucibus sapien id magna vehicula ac pellentesque quam volutpat. Vivamus condimentum faucibus urna a molestie. Phasellus auctor arcu id enim feugiat porta. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
   </div>
 
   <div id="footer">
   	&copy;/sitemap stuff here
   </div>
 
</body>
</html>
 
<!--
  _            __             
 / )  _/'  _  /__)_ _ '  _  _ 
(__()(///)(/ / ( (-( //)(-_)  
         _/          /       
-->
Fluid 2 Column Layout – w Left Sidebar, Header & Footer
Comments (0)   Filed under: CSS   Posted by: Hamid

Fixed Centered 2 Column Layout – w Right Sidebar, Header & Footer

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fixed Centered 2 Column Layout - Right Sidebar Header</title>
 
   <style type="text/css">
		/**
		 * Please note: borders are just to show you the boundaries, you will probably want to remove prior to use unless you like them...
		**/
 
		body {
			min-width: 800px;
			text-align: center;
		}
 
		#main-wrapper {
			width: 800px;
			margin: auto;
			text-align: left;
			border: 1px solid #CCCCCC;
		}
 
		#header {
			border: 1px solid #9900FF;
		}
 
		#side-bar {
			width: 200px;
			float: right;
			border: 1px solid #993300;
		}
 
		#contents {
			margin-right: 220px;
			border: 1px solid #0099FF;
		}
 
		#footer {
			border: 1px solid #669900;
		}
 
	</style>
 
</head>
 
<body>
<div id="main-wrapper">
 
   <div id="header">
   	Logo and menu here
   </div>
 
   <div id="side-bar">
   	I'm the side bar
   </div>
 
   <div id="contents">
   	Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec massa nibh, feugiat ut condimentum nec, ullamcorper nec ipsum. Cras vitae dolor nisl, ut scelerisque libero. Etiam nisi velit, pulvinar in volutpat posuere, venenatis nec justo. Curabitur imperdiet tellus tincidunt turpis venenatis a aliquet augue rutrum. Aliquam mattis lacus sed urna fringilla non pretium dolor sodales. Curabitur dapibus risus vitae libero dignissim et tristique enim ullamcorper. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum non magna ipsum. Nunc sem neque, scelerisque auctor sodales blandit, pretium sit amet quam. Duis sed turpis mi, a eleifend dui. Mauris pellentesque pretium tincidunt. Fusce sit amet massa quis dui ornare feugiat. Integer consequat purus et est tempus feugiat. Praesent a libero quis leo commodo blandit in at elit. Nunc faucibus sapien id magna vehicula ac pellentesque quam volutpat. Vivamus condimentum faucibus urna a molestie. Phasellus auctor arcu id enim feugiat porta. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
   </div>
 
   <div id="footer">
   	&copy;/sitemap stuff here
   </div>
 
</div>
</body>
</html>
 
<!--
  _            __             
 / )  _/'  _  /__)_ _ '  _  _ 
(__()(///)(/ / ( (-( //)(-_)  
         _/          /       
-->
Fixed Centered 2 Column Layout – w Right Sidebar, Header & Footer
Comments (0)   Filed under: CSS   Posted by: Hamid

Fixed Centered 2 Column Layout – w Left Sidebar, Header & Footer

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fixed Centered 2 Column - Left Sidebar</title>
 
   <style type="text/css">
		/**
		 * Please note: borders are just to show you the boundaries, you will probably want to remove prior to use unless you like them...
		**/
 
		body {
			min-width: 800px;
			text-align: center;
		}
 
		#main-wrapper {
			width: 800px;
			margin: auto;
			text-align: left;
			border: 1px solid #CCCCCC;
		}
 
		#header {
			border: 1px solid #9900FF;
		}
 
		#side-bar {
			width: 200px;
			float: left;
			border: 1px solid #993300;
		}
 
		#contents {
			margin-left: 220px;
			border: 1px solid #0099FF;
		}
 
		#footer {
			border: 1px solid #669900;
		}
 
	</style>
 
</head>
 
<body>
<div id="main-wrapper">
 
   <div id="header">
   	Logo and menu here
   </div>
 
   <div id="side-bar">
   	I'm the side bar
   </div>
 
   <div id="contents">
   	Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec massa nibh, feugiat ut condimentum nec, ullamcorper nec ipsum. Cras vitae dolor nisl, ut scelerisque libero. Etiam nisi velit, pulvinar in volutpat posuere, venenatis nec justo. Curabitur imperdiet tellus tincidunt turpis venenatis a aliquet augue rutrum. Aliquam mattis lacus sed urna fringilla non pretium dolor sodales. Curabitur dapibus risus vitae libero dignissim et tristique enim ullamcorper. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum non magna ipsum. Nunc sem neque, scelerisque auctor sodales blandit, pretium sit amet quam. Duis sed turpis mi, a eleifend dui. Mauris pellentesque pretium tincidunt. Fusce sit amet massa quis dui ornare feugiat. Integer consequat purus et est tempus feugiat. Praesent a libero quis leo commodo blandit in at elit. Nunc faucibus sapien id magna vehicula ac pellentesque quam volutpat. Vivamus condimentum faucibus urna a molestie. Phasellus auctor arcu id enim feugiat porta. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
   </div>
 
   <div id="footer">
   	&copy;/sitemap stuff here
   </div>
 
</div>
</body>
</html>
 
<!--
  _            __             
 / )  _/'  _  /__)_ _ '  _  _ 
(__()(///)(/ / ( (-( //)(-_)  
         _/          /       
-->
Fixed Centered 2 Column Layout – w Left Sidebar, Header & Footer
Comments (0)   Filed under: CSS   Posted by: Hamid

Fixed Centered 2 Column Layout – Right Sidebar

You may want to remove the borders prior to use:

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fixed Centered 2 Column Layout - Right Sidebar</title>
 
   <style type="text/css">
		/**
		 * Please note: borders are just to show you the boundaries, you will probably want to remove prior to use unless you like them...
		**/
 
		body {
			min-width: 800px;
			text-align: center;
		}
 
		#main-wrapper {
			width: 800px;
			margin: auto;
			text-align: left;
			border: 1px solid #CCCCCC;
		}
 
		#side-bar {
			width: 200px;
			float: right;
			border: 1px solid #993300;
		}
 
		#contents {
			margin-right: 220px;
			border: 1px solid #0099FF;
		}
 
	</style>
 
</head>
 
<body>
<div id="main-wrapper">
 
   <div id="side-bar">
   	I'm the side bar
   </div>
 
   <div id="contents">
   	Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec massa nibh, feugiat ut condimentum nec, ullamcorper nec ipsum. Cras vitae dolor nisl, ut scelerisque libero. Etiam nisi velit, pulvinar in volutpat posuere, venenatis nec justo. Curabitur imperdiet tellus tincidunt turpis venenatis a aliquet augue rutrum. Aliquam mattis lacus sed urna fringilla non pretium dolor sodales. Curabitur dapibus risus vitae libero dignissim et tristique enim ullamcorper. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum non magna ipsum. Nunc sem neque, scelerisque auctor sodales blandit, pretium sit amet quam. Duis sed turpis mi, a eleifend dui. Mauris pellentesque pretium tincidunt. Fusce sit amet massa quis dui ornare feugiat. Integer consequat purus et est tempus feugiat. Praesent a libero quis leo commodo blandit in at elit. Nunc faucibus sapien id magna vehicula ac pellentesque quam volutpat. Vivamus condimentum faucibus urna a molestie. Phasellus auctor arcu id enim feugiat porta. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
   </div>
 
</div>
</body>
</html>
 
<!--
  _            __             
 / )  _/'  _  /__)_ _ '  _  _ 
(__()(///)(/ / ( (-( //)(-_)  
         _/          /       
-->
Fixed Centered 2 Column Layout – Right Sidebar
Comments (0)   Filed under: CSS   Posted by: Hamid
Older Posts »