need help?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
User avatar
yellowled
Regular
Posts: 6987
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: need help?

Post by yellowled » Wed Jun 06, 2018 10:18 pm

How a table looks like should never be defined in your markup (i.e. what you create in whatever sort of editor). As you correctly assume, that's what CSS is for. I can not explain CSS to its full extent in a forum post, you'll have to read up on that yourself. Mozilla has a great introduction as well as a reference on CSS.

As to where to put it in Serendipity, there's usually three sources of CSS in a Serendipity blog, all of whom are being combined by Serendipity dynamically into one stylesheet.
  • your theme's stylesheet, usually to be found at /templates/<YOUR_THEME>/style.css (but it can have a different filename, and there can be multiple .css files there)
  • styles generated by the plugins you use (those are usually injected dynamically be the plugins, meaning there is no file you can edit
  • in addition, you can (but don't have to) add your own /templates/<YOUR_THEME>/user.css files which Serendipity will automagically use
Since the user.css is not part of s9y, it can not be overwritten by an update, which is why it's usually the best place for end users to add custom styles. There are other ways, but this is the fool-proof one. Due to the specific nature of CSS (called "the cascade"), you can override styles in stylesheets that are being referenced later. That means if the theme's style.css sets a certain style, you can (usually) set it again in your user.css to override it.

Most s9y themes will not style tables. That's because tables have a bad rep (which stems from them being misused for layout purposes), so most people are unlikely to use them because they have heard that "tables are bad" (which is not true for displaying tabular data at all). Also, it can be a hassle to generate and edit tables using most WYSIWYG editors, so it's not very common to even see tables in blogs.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

Post Reply