Category Archives: css

Basic CSS tricks

Hi,

today i wanted to share some basic CSS tricks :)

Dont resize textarea on chrome and safari

the textarea can be resized on chrome and safari, and even that seems to be a nice feature, when you have a limited and strict layout, this could screw up the things. to avoid this, just add this css code to your stylesheet:

textarea{

resize: none;

}

Scrollbars for DOM

sometimes you need to show content in a small space, not enough maybe for the content, so it come useful some scroll bars, for that, add the overflow property:

overflow: scroll;

Static background like twitter

you always wanted a background like the twitter accounts have right? is easy as like this:

backgroun-attachement: fixed;

Text lowercase, uppercase or capital

if you have a stream of data and is not well formatted, you can user this properties to do it :

text-transform: uppercase // MY TEXT

text-transform: lowercase // my text

text-transform: capitalize //My Text

Input button or submit with a custom image

maybe you have designed a image button, and want to apply it to a input submit or button, for that, you can use this code:

background: transparent url(image.png) 0 0 no-repeat; //your background image
border: none; //setting border to none
overflow: hidden; // all the excess of data or text is hide
text-indent: -3000px;  //moving the text inside the button outside the field of view

i hope this help you in some way :D

Regards,

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Random Posts

    CSS tip #1: Scroll

    Hi,

    just a quick one, let say you have a div that need to have content bigger than it is and need to be able to scroll it, sometime ago i have done it using a scroll using images and javascript but a little while just founded that the overflow property can make this for you !

    just in your div class put:

    overflow:scroll;

    and now if the content of the div is bigger, the scroll bars will be added :D

    Regards,

    Shadow.

    [Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Random Posts