div {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
}
Code language: CSS (css)
To round a specific corner (top-left or bottom-right) use below stylesheet. div {
-moz-border-radius-topleft: 10px;
-webkit-border-top-left-radius: 10px;
}
Code language: CSS (css)
Further Reading: Rounded Corner Stylesheet without images <!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie-only.css" />
<![endif]-->
Code language: HTML, XML (xml)
IE 7 Only <!--[if IE 7]>
<link href="IE-7-SPECIFIC.css" rel="stylesheet" type="text/css">
<![endif]-->
Code language: HTML, XML (xml)
Further Reading: IE Specific Stylesheet input#sometextbox {
background-image:url('back-image.gif');
background-repeat:no-repeat;
padding-left:20px;
}
Code language: CSS (css)
Further Reading: Background Image for Textbox <body>
<div id="container">
Code language: HTML, XML (xml)
Next we create our CSS commands, so as to create a minimum width of 600px: #container {
min-width: 600px;
width:expression(document.body.clientWidth < 600? "600px": "auto" );
}
Code language: CSS (css)
The first command is the regular minimum width command; the second is a short JavaScript command that only IE understands. Do note though, this command will cause your CSS document to invalidate so you may prefer to insert it into the head of each HTML document to get round this. .transparent_class {
filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
Code language: CSS (css)
html { overflow-y:scroll; }
Code language: CSS (css)
.rotate-style {
/* Safari */
-webkit-transform: rotate(-90deg);
/* Firefox */
-moz-transform: rotate(-90deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
Code language: CSS (css)
<link type="text/css" rel="stylesheet" href="handheldstyle.css" media="handheld" />
Code language: CSS (css)
/* Mozilla based browsers */
::-moz-selection {
background-color: #FFA;
color: #000;
}
/* Works in Safari */
::selection {
background-color: #FFA;
color: #000;
}
Code language: CSS (css)
a:active {
outline: none;
}
Code language: CSS (css)
<body>
<div id="page-wrap">
<!-- all websites HTML here -->
</div>
</body>
Code language: HTML, XML (xml)
#page-wrap {
width: 800px;
margin: 0 auto;
}
Code language: CSS (css)
p:first-letter {
font-size : 300%;
font-weight : bold;
float : left;
width : 1em;
}
Code language: CSS (css)
a[href$='.doc'] {
padding:0 20px 0 0;
background:transparent url(/graphics/icons/doc.gif) no-repeat center rightright;
}
Code language: CSS (css)
text-transform: capitalize;
text-transform: lowercase
text-transform: uppercase
Code language: CSS (css)
p { text-shadow: 1px 1px 1px #000; }
Code language: CSS (css)
Multiple shadows: p { text-shadow: 1px 1px 1px #000, 3px 3px 5px blue; }
Code language: CSS (css)
The first two values specify the length of the shadow offset. The first value specifies the horizontal distance and the second specifies the vertical distance of the shadow. The third value specifies the blur radius and the last value describes the color of the shadow: 1. value = The X-coordinate 2. value = The Y-coordinate 3. value = The blur radius 4. value = The color of the shadow Using positive numbers as the first two values ends up with placing the shadow to the right of the text horizontally (first value) and placing the shadow below the text vertically (second value). The third value, the blur radius, is an optional value which can be specified but don’t have to. It’s the amount of pixels the text is stretched which causes a blur effect. If you don’t use the third value it is treated as if you specified a blur radius of zero. .page { background-color:blue ; background-color:red; }
Code language: CSS (css)
.page-break { page-break-before:always; }
Code language: CSS (css)
input[type=submit],label,select,.pointer { cursor:pointer; }
Code language: CSS (css)
body{ font-size:62.5%; }
Code language: CSS (css)
@media all
{
.page-break { display:none; }
}
@media print
{
.page-break { display:block; page-break-before:always; }
}
Code language: CSS (css)
Further Reading: 20 Top jQuery tips & tricks for jQuery programmers 20 very useful Java code snippets for Java Developers 15 very useful PHP code snippets for PHP developers Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…
Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…
Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…
1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…
GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…
1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…
View Comments
thanks for this great tips
@designfollow: You welcome :)
Great css tips, thanks for sharing!
Hi Viral, i have one doubt, i have devided my page into two divisions , one for left menu and main content. I have given same length for both in home page, but in other pages main contents will be more than left menu, i want left 's background image to be expanded with respect to the right content. I tired relative parameter, but not working. Please help.
Thank you,
Umaimath.
Thanks. Great tips. Some of them I already knew, but others are quite useful.
Nice Tips. Its very help full for freshers.
Nice Tips,Some are new to me.Thanks
Really great styled tips. I have been looking around some of them, while I don't understand the others.
Thank you for such a nice article.
Very Nice tips , thank you for sharing to all ..... :)
very Nice tips, I love the rounded corner tips..
Thanks,
nice its very useful, thnks