Rounded Edges For Textarea With Css - CSS way of formatting elements

Pages: 1, 2
free web hosting

Read Latest Entries..: (Post #11) by rvovk on Aug 8 2005, 09:37 AM. (Line Breaks Removed)
@Dragonfly - Yes links are there just to point you at my tutorials here. If anyone is needed.Kinda don't find time to write them twice. Maybe in the future. But if somebody finds some other tutorial intresting, then he will be pointed here to check it out @Tyssen - I guess it is this thing, what are you more used of. IMportant rule is that your site looks good in final result and it doesn'... read more.
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Open Discussion > CONTRIBUTE > Tutorials

Rounded Edges For Textarea With Css - CSS way of formatting elements

rvovk
Today's tutorial is meant for spicing up graphical looks of textarea in our websites. Instead of plain squared edges we will gain rounded edges. Result of this tutorial will look like this:

user posted image

So let begin with CSS file. First we will define body:

CODE
body{
width:100%;
 margin:0;
 padding:0;
 text-align:center;
background:#FFFFFF;
}


We have choosen that our body background will be white (#FFFFFF). Cause we will be using rounded corners for our textarea with background color bright blue (#B4D5ED). Rounded corner's images are:

Topleft user posted image
Topright user posted image
Bottomright user posted image
Bottomleft user posted image

We will embed then into our textarea, next pictures is showing us how it is done:

user posted image

It is like pilling onion. In HTML. If we look at text which is defined with class TEXT which is relativly looking at the top, then we have class TOPLEFT, TOPRIGHT, BOTTOMRIGHT and BOTTOMLEFT which are in sequence from topleft clockwised to bottomright, at the bottom lies class TEXTAREA which is cover with other classes and being formatted that way.

user posted image

So documents starts rendering with BODY and goes towards up to last class, which is TEXT and all classes (or ID) are closed with </div>. I see this as pyramidal structure.

So HTML file looks like this:

CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<link rel="shortcut icon" href="slike/favicon.ico" type="image/x-icon">

<title>Rounded edges for textarea with CSS.</title>
<meta http-equiv="content-type" content="text/html;charset=windows-1250">
<style type="text/css" media="all">@import "layout1.css";</style>

</head>

<body>

<div class="textarea">
<div class="topleft">
<div class="topright">
<div class="bottomright">
<div class="bottomleft">
<p class="text">Things in the future have changed dramatically. I bought Canon A40 in year 2002 and took several interesting pictures with it. Later I bought Sony DSC S-75 cause I liked its macro potencial. But I sold it quickly cause it had lot of noise in images and awful white balance. Just before end of year 2003 I bought myself second hand Canon G3 which I am still using. Canon G3 is very good prosumer camera with pleasant results.</p>
</div><!--bottomleft-->
</div><!--bottomright-->
</div><!--topright-->
</div><!--topleft-->
</div><!--textarea-->

</body>
</html>


Textarea is defined in CSS with next code. There is no padding (if there was any then your background would be corrupted). Background is set to #B4D5ED and width to 300px.

CODE
.textarea{
margin:10px auto 0 auto;
padding:0;
width:300px;
background:#B4D5ED;}


Div classes for rounded edges are name with TOPLEFT, TOPRIGHT, BOTTOMRIGHT, BOTTOMLEFT. They are almost same code, so I will explain only one.

So here is code for all divclasses of rounded edges. As we saw at beggining we have background images that are named same as div classes. Margin and padding is set to 0, cause we don't wanna have corrupted background, url is defining relative path to your background image. Position is declared for class TOPLEFT with code: top left no-repeat. This defines topleft positon and no-repeat, cause we wanna for every image to be presented only once. Same goes for other div classes, only position is changes and name of image file.

CODE
.topleft{
margin:0;
padding:0;
background:url(topleft.jpg) top left no-repeat;}

.topright{
margin:0;
padding:0;
background:url(topright.jpg) top right no-repeat;}

.bottomright{
margin:0;
padding:0;
background:url(bottomright.jpg) bottom right no-repeat;}

.bottomleft{
margin:0;
padding:0;
background:url(bottomleft.jpg) bottom left no-repeat;}


Code for text is next. This rather formatting of text, important thing is that we used padding of 10px to have same space around text.

CODE
p.text{
 font:12px/16px verdana, arial, serif;
color: #000000;
margin:0;
padding:10px;
text-align:justify; }


Working example is available: here.
CSS file is available: here.

Any suggestions are welcome.
Best regards.


 

 

 


Reply

Adamrosso
Nice tutorial. I see you are pretty good with CSS. Funny how i was looking for a tutorial like this. Anyway, thank you. 10/10

Reply

cragllo
When I read this i thought you mean input textarea, But anyway, awesome tutorial, plain and simple, easy to follow.

Reply

rvovk
With small workflow it can be used for input textarea too.

Reply

Tyssen
Not trying to rain on your parade, but you can accomplish the same effect through CSS without images.

Reply

rvovk
Dammit, Tyssen. I am always two steps behind you laugh.gif
I wonder how would you make shadows without images tongue.gif
Thanx for link, It was educational.

Reply

cragllo
Shadows are easy, use layers.... one dark, one light....

Reply

truefusion
QUOTE(rvovk @ Aug 7 2005, 08:57 AM)
I wonder how would you make shadows without images  tongue.gif

Filters, for example:

CODE

<style>
.DS{
filter: dropshadow(color=black, offx=1, offy=1, positive=1);
height: 9
}


This may only work for IE. For some reason it wont work without the height property.

Reply

Sprnknwn
Very interesting. I thought the tutorial was really good (I still think it) but the link to the explanation to do the same effect without images itīs impressive!

I think Iīll learn some CSS with time and nice people like you.

Reply

Dragonfly
I went to your site for tutorials, of course the link was from your signature and when I visited your webpage the tutorial is redirecting me here.

Now my comment: Really nice and helpful. Thanks for sharing it here. I have been using table to place curve images. And loading time is taking much... CSS always come in handy in this kind of situation.


Reply

Latest Entries

rvovk
@Dragonfly - Yes links are there just to point you at my tutorials here. If anyone is needed.Kinda don't find time to write them twice. Maybe in the future. But if somebody finds some other tutorial intresting, then he will be pointed here to check it out smile.gif

@Tyssen - I guess it is this thing, what are you more used of. IMportant rule is that your site looks good in final result and it doesn't take longer time to load.

Thanx for comments smile.gif


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Pages: 1, 2
Recent Queries:-
  1. css rounded corner textarea - 5.53 hr back. (1)
  2. text margin in textarea css - 5.82 hr back. (1)
  3. textarea css - 16.90 hr back. (1)
  4. css rounded edges without images - 19.57 hr back. (1)
  5. css rounded input - 19.96 hr back. (1)
  6. rounded input html - 24.33 hr back. (1)
  7. textarea nice css - 34.46 hr back. (1)
  8. text area css formatting - 46.73 hr back. (1)
  9. text area css - 47.58 hr back. (1)
  10. style textarea css rounded corners - 49.81 hr back. (1)
  11. css textarea - 13.47 hr back. (2)
  12. css textarea round corners - 52.89 hr back. (1)
  13. textarea with round corners, html - 53.04 hr back. (1)
  14. css textarea - 53.09 hr back. (1)
Similar Topics

Keywords : rounded, edges, textarea, css, css, formatting, elements

  1. Formating Your Form "textarea" And "submit" Button
    if you are fed up with default settings (0)
  2. How To Format Your Flash Disk/ Diskettes
    Formatting your flash or diskette (6)
    Now sometime your flash disk or diskette might have corrupt data, don't worrry just format it.
    follow these simple steps: 1. Double click "My Computer" on your desktop. It opens a window with
    all the available disks. 2. Right-click, your "Removable Disk" or "3 1/2 Floppy" 3. Then click
    "Format" it would bring out a window 4. you can either choose "Quick Format" option to make the
    formatting faster. 5. then click the format buttooon. it formats the drive. When it finishes it
    show you the "format complete" dialog, click "ok" and it is done. you have a formatted d....

    1. Looking for rounded, edges, textarea, css, css, formatting, elements

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for rounded, edges, textarea, css, css, formatting, elements

*MORE FROM TRAP17.COM*
advertisement



Rounded Edges For Textarea With Css - CSS way of formatting elements



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE