comtersoft » HTML & CSS
Call us today at US: 703 - 349 - 1168 | India: +91 471 - 301 0690

Archive for the ‘HTML & CSS’ Category

css hacks for IE

Posted on July 15th, 2009 in HTML & CSS | No Comments »

 

While writing XHTML/CSS we might have faced the problem of browser compatibility. Following are some ways to solve these issues in IE browsers

In IE 6 series before a class or ID specify *html

Eg . if your class name is .content  then you write

*html   .content  {  … }

If it is an id you can write it as below

*html #content { …. }

In IE 7 series inside the class or ID you write # before each element

Eg.

.content { margin:3px; #margin:4px }

Here in IE 7 browsers margin will take 4px where in other browsers it will take 3px

CSS Hacks

Posted on July 7th, 2009 in HTML & CSS | No Comments »

 

Css Hacks for Mozilla fire fox2 and 3 , Chrome

//Normal

.search_box .content .form-item .form-text { width:180px; border:1px solid #a9a9a8; border-right:none; height:15px; }

// FF2

.search_box .form-submit , x:-moz-any-link { background:url(images/bg/search.jpg) no-repeat; width:30px; height:19px; border:1px solid #a9a9a8; border-left:none; margin-left:-4px; top:0px; #top:0px; #left:-4px; left:-4px; position:relative; }

//FF3

.search_box .form-submit, x:-moz-any-link, x:default { background:url(images/bg/search.jpg) no-repeat; width:30px; height:19px; border:1px solid #a9a9a8; border-left:none; margin-left:-4px; top:1px; #top:0px; #left:-4px; left:-4px; position:relative; }

//Chrome

html* .search_box .form-submit { background:url(images/bg/search.jpg) no-repeat; width:30px; height:19px; border:1px solid #a9a9a8; border-left:none; margin-left:-4px; top:0px; position:relative; }

Image Transparency in CSS

Posted on July 6th, 2009 in HTML & CSS | No Comments »

 

Image Transparency

Here is one example showing image Transparency in css

Html file

<!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>TemplateWorld - Solitude</title>

<link href=”style.css” rel=”stylesheet” type=”text/css” />

</head>

<body>

<div id=”global”>

<div class=”image”>

<img src=”img.jpg” width=”800″ height=”555″ border=”0″ title=”productlist3″ alt=”productlist3″>

<div class=”text”></div>

<div class=”words”>

<p> AABBCE<br />

MRP.Rs. 11,000/- <br />

<a href=”#”>More Details</a>

</div>

</div>

</div>

</body>

</html>

Style.css file

#global { margin:auto; }

.image {position:relative; width:800px; height:555px; margin-left:10px; float:left;margin-left:20px; background:#000;}

.text {position:absolute; top:0; right:0; padding: 0px; width:800px; height:555px; background:#fff; margin-top:386px;}

.text {filter: alpha(opacity=50); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=80); -moz-opacity: 0.50; opacity:0.5; }

.words {position:absolute; top:0; right:0; padding: 0px; width:800px; height:555px; background:#fff; margin-top:386px; background:transparent; }

.words p {font-family:”Arial”; font-size:10px; margin:0px; padding:0px; color:#7b7a61; padding-left:10px; padding-top:5px;}

.words a { color:#4da3c6;}

The secret of getting ahead is getting started. ComterSoft is the starting point