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
- 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
1 weeks ago
Views: 1,196 • 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
2 weeks ago
Views: 258 • 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 ✅
2 weeks ago
Views: 366 • Comments: 1 • Rating: 11 - March FavoritesYou've seen these all already but looking back, just because. These are my favorite shots of this last month. That 1937 Zeiss Sonnar is such a gloriously wonderful bit of glass. Thanks for looking.
William Lewis
3 weeks ago
Views: 503 • Comments: 2 • Rating: 9 - Russia’s New Combat Robots Blown Up by Drones Near Avdiivka When we landed on the moon, I thought about how science fiction had become real. Now, the robot wars have begun. It's more poignant somehow on the ground than in the missile wars we have in the air as ...
Rightwingconspirator
3 weeks ago
Views: 529 • Comments: 1 • Rating: 5 - Why Did More Than 1,000 People Die After Police Subdued Them With Force That Isn’t Meant to Kill? An investigation led by The Associated Press has found that, over a decade, more than 1,000 people died after police subdued them through physical holds, stun guns, body blows and other force not intended to be lethal. More: Why ...
Cheechako
3 weeks ago
Views: 516 • Comments: 1 • Rating: 5 - A Closer Look at the Eastman State Bar DecisionTaking a few minutes away from work things to read through the Eastman decision. As I'm sure many of you know, Eastman was my law school con law professor. I knew him pretty well because I was also running in ...
KGxvi
3 weeks ago
Views: 422 • Comments: 1 • Rating: 4 - Abortions Outside Medical System Increased Sharply After Roe Fell, Study Finds The number of women using abortion pills to end their pregnancies on their own without the direct involvement of a U.S.-based medical provider rose sharply in the months after the Supreme Court eliminated a constitutional right to abortion, according ...
Cheechako
4 weeks ago
Views: 747 • Comments: 0 • Rating: 4
- Recent PagesClick to refresh
- 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
Yesterday
Views: 56 • Comments: 0 • Rating: 0 - 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
4 days ago
Views: 162 • Comments: 0 • Rating: 1