Category Archives: css
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
Regards,
Shadow.





