css workshop
the atmosphere continues to leak over LA. but this just in, from the Looking On The Bright Side Dept.: when the rain finally stops, at least we’ll get a few days of crystal clear air.
speaking of clearing the air, it’s amazing how much crud can accumulate in one’s CSS file. i went through the stylesheet for this page this morning weeding out unused classes, assigning classes to tags (e.g., the ‘greyheader’ and ‘date’ classes were combined into H1), and removing other detritus.
i’m trying to get closer to the ideal of separating structure from presentation by using header tags, paragraphs, etc. for structure and moving as many of the presentation elements as possible into the stylesheet. where they belong.
i moved the table cell backgrounds into the CSS as well; instead of using
i define classes for the TD tag in the stylesheet, like this:
td.hdots {
background-image: url(/shared-images/horizontaldots.gif);
}
then, to apply the background image, i can just assign a class to the TD tag like this:
nice and clean!
from a purely philosophical viewpoint i shouldn’t be using tables at all for the design because the page doesn’t consist of “tabular” data. i probably could put together a layout that would look pretty much the same with DIVs, the true 21st century approach to web site design.
but from a purely pragmatic viewpoint (which usually takes precedence, kind of like a FONT tag in the code takes precedence over a CSS style), using tables lets this site look very nearly the same even in v4+ browsers that don’t understand CSS, or that have buggy implementations of CSS (can you say Netscape?). and it completely eliminates the need for clumsy browser-based redirection kludges.
now, if you’re looking at this with a version 3 or earlier browser, or if you have stylesheets turned off, it probably looks a bit strange because all the table cell backgrounds are in the CSS. you’re seeing gaps in the design where the backgrounds are supposed to be. but hopefully, it should still be readable…and the tables should keep the content in pretty much the same orientation. i think this is a decent tradeoff; keep the content readable and not too jumbled up, even if all the pretty graphics aren’t visible.
Or... you can just click this button to open the Pages posting window right away.
Last updated: 2023-04-04 11:11 am PDT LGF User's Guide RSS Feeds
- Featured PagesClick to refresh
- Gateway Pundit, Sued by Election Workers, Declares BankruptcyA onetime favorite, now just pathetic figure around these parts, Jim Hoft aka SMOTI ("Stupidest Man On The Internet"), has filed for Chapter 11 bankruptcy in response to the defamation lawsuits filed against him to the same election workers that ...
Khal Wimpo (free internal organs upon request!)
2 days ago
Views: 137 • Comments: 0 • Rating: 3 - The Pandemic Cost 7 Million Lives, but Talks to Prevent a Repeat Stall In late 2021, as the world reeled from the arrival of the highly contagious omicron variant of the coronavirus, representatives of almost 200 countries met - some online, some in-person in Geneva - hoping to forestall a future worldwide ...
Cheechako
2 weeks ago
Views: 962 • Comments: 0 • Rating: 2 - Once Praised, the Settlement to Help Sickened BP Oil Spill Workers Leaves Most With Nearly Nothing When a deadly explosion destroyed BP’s Deepwater Horizon drilling rig in the Gulf of Mexico, 134 million gallons of crude erupted into the sea over the next three months — and tens of thousands of ordinary people were hired ...
Cheechako
2 weeks ago
Views: 926 • Comments: 0 • Rating: 1 - Alone in a Bathroom: The Fear and Uncertainty of a Post-Roe Medication Abortion Angel tucked two white pills into each side of her mouth, bracing herself as they began to dissolve. Her deepest fears and anxieties took over. Angel had wanted to talk to a doctor before she took the pills to ...
Cheechako
3 weeks ago
Views: 1,370 • Comments: 0 • Rating: 3 - They Were Desperate to Get Pregnant. Then IVF Gave Them Extra Embryos. One morning last spring, Ashley Harrolle put her 1-year-old daughter down for a nap and went to the kitchen. She pulled up her fertility clinic’s contact information. It was time to make the call. In a freezer several hundred ...
Cheechako
3 weeks ago
Views: 501 • Comments: 0 • Rating: 1 - Pictures From Today’s Exhibition of Paintings Done by Jane LilienthalPROPS TO MICHELE AND SAGEHEN FOR CATCHING THE SPELLING ERROR IN THE TITLE THAT MY DIABETIC EYES COULDN'T CATCH I wanted to share pictures of the art show I visited today. The portraits were created by the mother of my ...
Joe Bacon ✅
4 weeks ago
Views: 579 • Comments: 1 • Rating: 11
- Recent PagesClick to refresh
- Best of April 2024 Nothing new here but these are a look back at the a few good images from the past month. Despite the weather, I was quite pleased with several of them. These were taken with older lenses (made from the ...
William Lewis
10 hours ago
Views: 94 • Comments: 0 • Rating: 3 - Texas County at Center of Border Fight Is Overwhelmed by Migrant Deaths EAGLE PASS, Tex. - The undertaker lighted a cigarette and held it between his latex-gloved fingers as he stood over the bloated body bag lying in the bed of his battered pickup truck. The woman had been fished out ...
Cheechako
3 weeks ago
Views: 374 • Comments: 0 • Rating: 1