CSS round corners

This is a discussion on "CSS round corners" within the Web Page Design section. This forum, and the thread "CSS round corners are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Sep 30th, 2007, 18:07
Reputable Member
Join Date: Sep 2007
Location: Tehran - Iran
Age: 29
Posts: 434
Blog Entries: 2
Thanks: 7
Thanked 7 Times in 7 Posts
Question CSS round corners

It maybe seems silly !
But I want to know why we should create round corners with CSS not with photoshop ?
Why we try to divide the background to 8 parts to create a CSS DIVs background and not only put the background image itself behind a DIV ?
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Sep 30th, 2007, 18:27
Jack Franklin's Avatar
Moderator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,405
Blog Entries: 8
Thanks: 18
Thanked 14 Times in 14 Posts
Re: CSS round corners

You can make rounded corners without images using bullet points:
http://www.cssplay.co.uk/boxes/curves.html

Never tried it myself, I always use photoshop !

Jack
__________________
Jack Franklin - Webforumz Moderator
(x)HTML | CSS | PHP | MySQL | JQuery (Javascript)
Contact: My Blog | Twitter | Delicious
Want Lessons? PM me.
If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Sep 30th, 2007, 19:34
Reputable Member
Join Date: Sep 2007
Location: Tehran - Iran
Age: 29
Posts: 434
Blog Entries: 2
Thanks: 7
Thanked 7 Times in 7 Posts
Re: CSS round corners

I know, i mean those css that uses images to creating round corners
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Sep 30th, 2007, 20:12
Jack Franklin's Avatar
Moderator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,405
Blog Entries: 8
Thanks: 18
Thanked 14 Times in 14 Posts
Re: CSS round corners

Oh I see what you mean. It's because it allows the <div> with the rounded corners to expand in width and height but keep the corners. If you had a rounded box that was say, 300x300, and your content was 500px high, you would need to edit your box. If your content then changed again, you would again have to edit your box.
__________________
Jack Franklin - Webforumz Moderator
(x)HTML | CSS | PHP | MySQL | JQuery (Javascript)
Contact: My Blog | Twitter | Delicious
Want Lessons? PM me.
If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Sep 30th, 2007, 20:28
Reputable Member
Join Date: Sep 2007
Location: Tehran - Iran
Age: 29
Posts: 434
Blog Entries: 2
Thanks: 7
Thanked 7 Times in 7 Posts
Re: CSS round corners

These types seems reasonable, but i see some types that they are fixed in height and width but they created with images and css, what about them ?
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Sep 30th, 2007, 20:49
Jack Franklin's Avatar
Moderator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,405
Blog Entries: 8
Thanks: 18
Thanked 14 Times in 14 Posts
Re: CSS round corners

Then the person who developed that has just made very hard work for themselves!
__________________
Jack Franklin - Webforumz Moderator
(x)HTML | CSS | PHP | MySQL | JQuery (Javascript)
Contact: My Blog | Twitter | Delicious
Want Lessons? PM me.
If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Sep 30th, 2007, 21:15
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS round corners

Quote:
If you had a rounded box that was say, 300x300, and your content was 500px high, you would need to edit your box. If your content then changed again, you would again have to edit your box.


I don't get it?????

jack can you explain? Are we talking about corners for css boxes that do NOT use an image?
Are you saying by using only css, no matter what size box you have for text, the corners will adjust in size making them the right ratio (is that the word I want?)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Sep 30th, 2007, 21:24
Reputable Member
Join Date: Sep 2007
Location: Tehran - Iran
Age: 29
Posts: 434
Blog Entries: 2
Thanks: 7
Thanked 7 Times in 7 Posts
Re: CSS round corners

No, the discussion is about those css round corners which use images and are in fixed sizes
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Sep 30th, 2007, 21:40
Jack Franklin's Avatar
Moderator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,405
Blog Entries: 8
Thanks: 18
Thanked 14 Times in 14 Posts
Re: CSS round corners

Quote:
Originally Posted by Lchad View Post


I don't get it?????

jack can you explain? Are we talking about corners for css boxes that do NOT use an image?
Are you saying by using only css, no matter what size box you have for text, the corners will adjust in size making them the right ratio (is that the word I want?)
Yep I think I have confused everyone here1

I belive the question asked was 'Why do people use all those extra divs and images when their text to go in their rounded box has a fixed width and height?'

I then got confused and posted a link to rounded boxes without images and then realised that he wasn't looking for a solution.

I think.

LOL sorry!

Jack
__________________
Jack Franklin - Webforumz Moderator
(x)HTML | CSS | PHP | MySQL | JQuery (Javascript)
Contact: My Blog | Twitter | Delicious
Want Lessons? PM me.
If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Sep 30th, 2007, 23:23
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS round corners

LOL... OK... I guess!

I'm so lost on this thread. Can rewind and start over?



I usually use a three div box.

1)Is usually a top div with an image of the top left/center/right portion of a graphic
2)Then a solid color center div (or an image with a background)
3)Is usually a bottom div with an image that has the bottom left/center/right


This limits you to how wide the box can expand because the top and bottom graphics cannot expand. They have set widths.

So I suppose by having a 1)left top corner, 2)top center (repeat-x), 3)right top corner
4)middle (repeat: both)
5)left bottom corner, 6)bottom center (repeat-x), 7)right bottom corner
that would account for 7 divs.
Now your boxes can expand in width and height as you need. Where is div #8?

And since I have not yet answered or tried to answer marsoul's question.. and completely confused myself... I have no idea why anyone would want to NOT use images unless you are a css purist.

Fire & Knowledge has a tutorial on it making rounded corners without images.. and reasons why...
I don't find any of his reasons very worthy.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Oct 1st, 2007, 11:50
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS round corners

http://www.webcredible.co.uk/user-fr...rs-boxes.shtml
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Oct 2nd, 2007, 02:25
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: CSS round corners

Quote:
Originally Posted by marSoul View Post
These types seems reasonable, but i see some types that they are fixed in height and width but they created with images and css, what about them ?
There should be some reason for that. Or maybe the developer don't know how to create rounded corner the css way.

Fixed width and height - go for photoshop
Flexible width and height - go for css
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Oct 2nd, 2007, 08:51
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS round corners

Quote:
Originally Posted by marSoul View Post
These types seems reasonable, but i see some types that they are fixed in height and width but they created with images and css, what about them ?
Fixed in height is pretty unusual.

Fixed-width boxes make sense in a fixed-width page layout, and they require fewer images (and less markup).

I believe scalable (elastic) layouts are best, and for these your boxes will need to be fully scalable too. But fixed-width layouts are easier, especially if you have lots of intricate decoration.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Oct 2nd, 2007, 11:36
Reputable Member
Join Date: Sep 2007
Location: Tehran - Iran
Age: 29
Posts: 434
Blog Entries: 2
Thanks: 7
Thanked 7 Times in 7 Posts
Re: CSS round corners

I know about fixed and elastic designs, but my question was why dont use programs like photoshop to create these boxes and dont create 8 pieces of images for css style ?
__________________
Designing For Communicating
Website : http://www.datisdesign.com
Weblog : http://blog.datisdesign.com

Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old Oct 2nd, 2007, 14:28
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS round corners

Quote:
Originally Posted by marSoul View Post
I know about fixed and elastic designs, but my question was why dont use programs like photoshop to create these boxes and dont create 8 pieces of images for css style ?
8 pieces is flexible.

If you want your box completely fixed, then you could make one big image. Ugh.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old Oct 4th, 2007, 09:55
Junior Member
Join Date: Aug 2007
Location: UK
Age: 25
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS round corners

Iv got scripts that do the rounded corners in CSS, complete with transparent edges so you can use it on gradient backgrounds.

Is this what your looking for instead of using images for the corners?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17  
Old Oct 4th, 2007, 09:57
welshstew's Avatar
Site Admin

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,713
Blog Entries: 14
Thanks: 4
Thanked 33 Times in 31 Posts
Re: CSS round corners

<cough>
you could always get someone to do it for you
</cough>
__________________
WelshStew Site Admin
If you think I've helped, click the "Thanks"
tierney rides tboard - uk site | xtreme wales - extreme clothing
WebForumz - facebook | LinkedIn
Last Blog Entry: Phorm approved for UK rollout (Sep 17th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18  
Old Oct 4th, 2007, 11:21
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS round corners

Bookmarked that Stew!!! Nice link (cough)!
Shhhh.. don't tell anyone I bookmarked it!
Digg this Post!Add Post to del.icio.us