Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-01-2005, 03:51 PM   PM User | #1
mlse
Regular Coder

 
mlse's Avatar
 
Join Date: Mar 2005
Posts: 624
Thanks: 20
Thanked 19 Times in 18 Posts
mlse is on a distinguished road
Question DIVs with rounded corners

Hi,

I would like to use DIVs (or whatever) with rounded corners to enclose the various elements of my web pages.

I have written a noddy bit of PHP which auto-generates a PNG image and allows you to specifiy the width, height, border thickness, corner radius, background colour, border colour, etc, etc of the image with transparent bits outside the corners. This image can then be set as a DIV background.

This is OK, but is there a pure CSS way of doing this? It would be nice to do it as pure CSS because, although my method works, it involves a couple of hacks and it's "icky".

TIA,
Mike.
mlse is offline   Reply With Quote
Old 06-01-2005, 05:13 PM   PM User | #2
bazz
Master Coder

 
Join Date: Apr 2003
Location: in my house
Posts: 5,211
Thanks: 39
Thanked 201 Times in 197 Posts
bazz will become famous soon enoughbazz will become famous soon enough
AKAIK, rounded corners are not supported by css2 but maybe they will be in css3?

Someone on here, much cleverer than me, posted a solution some time ago, which comprised a top gif which was a rectangle with its top corners rounded and another, for the bottom with its bottom corners rounded. Then in the css, these were assigned as background colors for parts of the style. I dont have the link handy otherwise I'd post it ;p sorry.

no guesses for why I remember the post. Back then, I wanted rounded corners too and they were decribed as s-o-o-o, last tuesday
Bazz
__________________
"The day you stop learning is the day you become obsolete"! - my late Dad.

Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
Useful MySQL resource
Useful MySQL link
bazz is offline   Reply With Quote
Old 06-01-2005, 05:52 PM   PM User | #3
mlse
Regular Coder

 
mlse's Avatar
 
Join Date: Mar 2005
Posts: 624
Thanks: 20
Thanked 19 Times in 18 Posts
mlse is on a distinguished road
Sounds similar to my solution using a PNG image!

So corners are just sooo last tuesday, eh? Like they're just so totally last season ... oh ya, like, y'know, kinda, like, whatever!
mlse is offline   Reply With Quote
Old 06-01-2005, 06:00 PM   PM User | #4
mlse
Regular Coder

 
mlse's Avatar
 
Join Date: Mar 2005
Posts: 624
Thanks: 20
Thanked 19 Times in 18 Posts
mlse is on a distinguished road
In the words of Baldrick, "I have a cunning plan ..."

(If you're not English and you never saw Blackadder, you won't understand that one!).
mlse is offline   Reply With Quote
Old 06-01-2005, 06:42 PM   PM User | #5
Skyzyx
Regular Coder

 
Skyzyx's Avatar
 
Join Date: Aug 2002
Location: Silicon Valley, CA
Posts: 980
Thanks: 0
Thanked 0 Times in 0 Posts
Skyzyx is on a distinguished road
I'd check out Nifty Corners: Rounded corners with CSS and JavaScript. It doesn't use images, and it's just a behavioral and style layer, so it downgrades and lifts right off your (X)HTML should your user's browsers not support it.
__________________

Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.
Skyzyx is offline   Reply With Quote
Old 06-01-2005, 10:29 PM   PM User | #6
mlse
Regular Coder

 
mlse's Avatar
 
Join Date: Mar 2005
Posts: 624
Thanks: 20
Thanked 19 Times in 18 Posts
mlse is on a distinguished road
Nice.

Ta.

mlse is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:05 PM.


Advertisement
Log in to turn off these ads.