TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-25-2009, 11:58 AM   #1 (permalink)
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default Corners on divs/tables

Can anyone offer advice on the best way to create curved corners on tables, divs etc. Assume i would need to create them as gifs in a paint package and then get the colours exactly spot on what i will be using for the rest of the table and background in the css. Anybody know of easy packages that make this easy on any general advice on doing it? Thanks.
captainmerton is offline  
Reply With Quote
Old 06-25-2009, 03:43 PM   #2 (permalink)
The Contributor
 
Join Date: Nov 2008
Location: Sweden
Posts: 36
Thanks: 1
hjalmar is on a distinguished road
Default

I would say that there isn't any general way of doing it. Don't get me wrong but it's a matter of choice really. Nested div's vs semantic markup all depends on how it's designed. Small images vs one large image, 4 server request vs 1, alpha transparancy vs no transparancy (dealing with alpha transparancy you don't want images to overlap eachother), expandable vs "static" box etc.

Then you always have the javascript way if you don't want to clutter your markup to much in development(easier to edit aswell).

Then there is a CSS3 property called border-radius: the thing is it isn't supported in all the browser but if you don't mind that you can use it for mozilla/webkit users.

Code:
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
With a table just do it grid like.

Are you able to whip-up a design or a box with rounded corners? then i could give you my opinion on how i would have done it.

cheers
hjalmar is offline  
Reply With Quote
Old 06-25-2009, 09:55 PM   #3 (permalink)
The Addict
 
CoryMathews's Avatar
 
Join Date: Nov 2007
Location: USA
Posts: 256
Thanks: 7
CoryMathews is on a distinguished road
Default

I wrote a blog post on this a while back.

http://corymathews.com/?p=348

It uses jQuery for the corners.
CoryMathews is offline  
Reply With Quote
Old 06-28-2009, 10:18 AM   #4 (permalink)
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default

Thanks for getting back to me. I'll take a look at JQuery. Cheers.
captainmerton is offline  
Reply With Quote
Old 08-19-2009, 06:11 PM   #5 (permalink)
The Wanderer
 
Join Date: Aug 2009
Posts: 17
Thanks: 0
Rhinos is on a distinguished road
Default

Several ways.

If the div is going to always be a fixed width and height the best way is to use a background image for it. It could be included in a CSS Sprite image and would be quicker and more semantic.

If the div is going to be dynamically sized based on content then you could use multiple images for each corner and position them using CSS inside the box.
Or you could use javascript to do it for you which would keep the code clean for non-javascript users but it isn't as quick as non-js methods.
Rhinos is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:22 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design