The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Rounded table corners
CharlesEF
post Jan 2 2025, 04:42 PM
Post #1


Programming Fanatic
********

Group: Members
Posts: 2,013
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



I want a table with rounded corners. Sounds simple. But border-radius seems to have no effect. Attached is a simple countdown timer I got from w3Schools. I'm working on a different display for the results among other changes. I was able to get rounded corners a different way. But a side effect is gaps between the th cells. If I use 'border-collapse: collapse' then I get rid of the gaps but I end up with both square and round corners.

Is there a secret I don't know about?
Attached File  countdown_timer.htm ( 3.51k ) Number of downloads: 20
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 2 2025, 05:24 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,781
Joined: 9-August 06
Member No.: 6



I think this may be what you are looking for.
https://unused-css.com/blog/css-rounded-table-corners/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jan 3 2025, 01:21 AM
Post #3


Programming Fanatic
********

Group: Members
Posts: 2,013
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Thanks, border-spacing was what I needed.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 3 2025, 06:23 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,781
Joined: 9-August 06
Member No.: 6



Suspected that. I struggled with the same thing. I think that article explains it well. It's obvious - once one knows it. biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jan 3 2025, 11:29 AM
Post #5


Programming Fanatic
********

Group: Members
Posts: 2,013
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



For anyone interested in my final solution. I only took a couple of CSS entries from the example article to make my CSS solution work. This example should work with any table of any size.
Attached File  countdown_timer.htm ( 3.6k ) Number of downloads: 12


This post has been edited by CharlesEF: Jan 3 2025, 11:33 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jan 3 2025, 11:59 AM
Post #6


Programming Fanatic
********

Group: Members
Posts: 2,013
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Ok, turns out to be too early in the morning for me. 1 correction needs to be made to my final solution post. Move these entries:
CODE
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  -o-border-radius: 5px;
  -khtml-border-radius: 5px;
  border-radius: 5px;
from '.countdown table' to '.countdown'. Sorry, now back to bed.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
coothead
post Jan 4 2025, 06:01 AM
Post #7


Advanced Member
****

Group: Members
Posts: 240
Joined: 12-January 23
From: chertsey, a small town 25 miles south west of london, england
Member No.: 28,743



Hi there CharlesEF,

note that these...

CODE

  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  -o-border-radius: 5px;
  -khtml-border-radius: 5px;

...are no longer required.

Source
https://caniuse.com/?search=border-radius

coothead
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jan 4 2025, 04:44 PM
Post #8


Programming Fanatic
********

Group: Members
Posts: 2,013
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Thanks for the info. Guess it's time to update my CSS template.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jan 5 2025, 03:31 PM
Post #9


Programming Fanatic
********

Group: Members
Posts: 2,013
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Ok, last upload. I remembered I used an external function file, which I didn't upload. This upload will run as is.
Attached File  countdown_timer.htm ( 3.73k ) Number of downloads: 9
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
coothead
post Jan 5 2025, 07:18 PM
Post #10


Advanced Member
****

Group: Members
Posts: 240
Joined: 12-January 23
From: chertsey, a small town 25 miles south west of london, england
Member No.: 28,743



Hi there CharlesEE,

I have separated your CSS and Javascript from the hTML to make things tidier.

Check out the attachment to see the result.

Attached File  CharlesEF.zip ( 1.98k ) Number of downloads: 8


P.S. What is going to occur in five years time?

coothead

This post has been edited by coothead: Jan 5 2025, 07:24 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jan 6 2025, 04:36 PM
Post #11


Programming Fanatic
********

Group: Members
Posts: 2,013
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



QUOTE(coothead @ Jan 5 2025, 06:18 PM) *

Hi there CharlesEE,

I have separated your CSS and Javascript from the hTML to make things tidier.

Check out the attachment to see the result.

Attached File  CharlesEF.zip ( 1.98k ) Number of downloads: 8



Thanks,I'll check it out and report back.
QUOTE(coothead @ Jan 5 2025, 06:18 PM) *


P.S. What is going to occur in five years time?

coothead

Who knows. Maybe they'll get 'border-collapse: collapse;' to work with 'border-radius'? Until then this solution should be fine, even if they get it to work.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
coothead
post Jan 7 2025, 02:35 PM
Post #12


Advanced Member
****

Group: Members
Posts: 240
Joined: 12-January 23
From: chertsey, a small town 25 miles south west of london, england
Member No.: 28,743



Hi there CharlesEE,


the only reason for my asking this...

QUOTE

What is going to occur in five years time?


...was that your countdown timer was set to expire in five years time.

I had no interest in the future use of the CSS that the code might have contained.

At eighty years of age, I will most likely have shuffled off this mortal coil by then. IPB Image


coothead
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jan 8 2025, 06:17 PM
Post #13


Programming Fanatic
********

Group: Members
Posts: 2,013
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Oh, that 5 years. That was the date on the w3schools example, that I worked with. No other reason.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 22nd January 2025 - 08:49 PM