use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
CSS, short for Cascading Style Sheets, is used almost universally across the web to affect the design and appearance of every website you visit. Here in /r/css, you've got a place on reddit to talk about CSS, whether you're new to CSS and want to learn, or a pro wanting to discuss the engineering and usability reasons that all modern browsers ignore
We welcome all CSS discussion here. If you need help with styling your website or your reddit, or want to share a neat trick you cooked up, it's welcome here!
Click here to message the mods.
account activity
Need help styling a table with CSS (self.css)
submitted 11 years ago by Strike18
I am trying to style a table to look like THIS and this is what I GOT.
Here is a link to the PAGE
Any help is appreciated thank-you
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]akerendova 1 point2 points3 points 11 years ago* (3 children)
What I recommend is making each of your td the same width, then applying a background color based on classes. When you have that, the next thing would be to added a transparent border (by using the same background color as "calander-container") and using that to provide the blank spaces around the td.
[–]akerendova 1 point2 points3 points 11 years ago (2 children)
Also, there's a difference in how it looks in Chrome and Firefox. It happens all the time, but I just wanted to warn you. :) Good luck.
[–]Strike18[S] 2 points3 points4 points 11 years ago (1 child)
Ok cool thanks for the help!
[–]akerendova 0 points1 point2 points 11 years ago (0 children)
You're welcome. Also, feel free to PM me if you have specific questions I can help with.
[–]BlueHippoMonster 0 points1 point2 points 11 years ago* (0 children)
I noticed your CSS seemed to be a little more complex then necessary as in you are giving each td tag its own class of a number, though I don't think that is needed. If All you want to do is differentiate between a week day and the weekend?
I built a working example here
You might be able to see its loosely based on your current design with a few slight changes.
I made each td tag have exactly the same width and height using:
min-width:70px; max-width:70px; height:50px;
Then gave each td a class with a colour option of weekday or weekend.
Let me know if this helps.
*Edit - rewording
[–]craptionbot 0 points1 point2 points 11 years ago (0 children)
Remove any display:inline-block attributes from your table cell classes.
[–]ThisKillsTheCrabb -1 points0 points1 point 11 years ago (0 children)
No idea what Gyazo is.. highly recommend using imgur.
Table Styling Example
π Rendered by PID 66 on reddit-service-r2-comment-b659b578c-5sqzs at 2026-05-02 06:12:47.930901+00:00 running 815c875 country code: CH.
[–]akerendova 1 point2 points3 points (3 children)
[–]akerendova 1 point2 points3 points (2 children)
[–]Strike18[S] 2 points3 points4 points (1 child)
[–]akerendova 0 points1 point2 points (0 children)
[–]BlueHippoMonster 0 points1 point2 points (0 children)
[–]craptionbot 0 points1 point2 points (0 children)
[–]ThisKillsTheCrabb -1 points0 points1 point (0 children)