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
- An Appeal to Heaven An ancient political phrase and a historic flag of the United States has entered the discourse as a flag of Christian Nationalism, insurrection, and the question of Supreme Court Associate Justice Samuel Alito's objectivity to rule on cases. So ...
Anymouse 🌹🏡😷
4 days ago
Views: 1,281 • Comments: 2 • Rating: 6 - Grocers Are Finally Lowering Prices as Consumers Pull Back Consumers have been grumbling about the soaring cost of groceries for nearly two years. Now, some of the biggest names in retail appear to be listening. In recent weeks, Target and Aldi have broadcast price cuts on thousands of ...
Cheechako
5 days ago
Views: 183 • Comments: 0 • Rating: 2 - A Water War Is Brewing Between the U.S. And Mexico. Here’s Why A water dispute between the United States and Mexico that goes back decades is turning increasingly urgent in Texas communities that rely on the Rio Grande. Their leaders are now demanding the Mexican government either share water or face ...
Cheechako
2 weeks ago
Views: 345 • Comments: 0 • Rating: 4 - Harper’s Magazine: Slippery Slope - How Private Equity Shapes a Ski Town …Big Sky stands apart for other reasons. The obvious distinction is the Yellowstone Club, a private resort hidden in the mountains above the community that Justin Farrell, a professor of sociology at Yale and the author of Billionaire Wilderness, ...
teleskiguy
2 weeks ago
Views: 543 • Comments: 1 • Rating: 6 - Hawaii’s Mauna Loa Observatory Just Captured Ominous Signals About the Planet’s Health Hawaii’s Mauna Loa Observatory just captured an ominous sign about the pace of global warming. Atmospheric levels of planet-warming carbon dioxide aren’t just on their way to yet another record high this year - they’re rising faster than ever, ...
Cheechako
3 weeks ago
Views: 1,274 • Comments: 0 • Rating: 3 - The Good Liars at the Schnecksville Trump Rally [VIDEO] New theories, great tunes and SHOCKING breaking news. SUPPORT US: http://Herohero.co/thegoodliars SEE THE GOOD LIARS LIVE!WASHINGTON D.C. MAY 23RD: https://www.unionstage.com/shows/good-liars-fix-america/NASHVILLE, TN JUNE 6TH: https://www.etix.com/ticket/p/42992972/the-good-liars-nashville-the-lab-at-zaniesSAN FRANCISCO, CA JUNE 25TH: https://www.livenation.com/event/G5vYZbavGvggG/the-good-liars SUBSCRIBE TO OUR AUDIO PODCAST:Apple Podcasts: https://podcasts.apple.com/us/podcast/the-good-liars-tell-the-truth/id1731178442Spotify: https://open.spotify.com/show/7mgfiwzr32907N4y68eFOCJoin this channel ...
teleskiguy
4 weeks ago
Views: 1,099 • Comments: 1 • Rating: 0 - Trump’s “Stolen Election” Lie Based on Evidence From Pervy Bathroom Cam-Spy OK, this really takes the cake. If you have relatives that still cling to the “election was stolen, dadgum, I jes’ KNOW IT … This should be a slight remedy to the stubborn madness Thanks to online anonymity, the ...
Khal Wimpo (free internal organs upon request!)
4 weeks ago
Views: 595 • Comments: 0 • Rating: 3 - 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
4 weeks ago
Views: 509 • Comments: 2 • Rating: 6
- Recent PagesClick to refresh
- Ranked-Choice Voting Has Challenged the Status Quo. Its Popularity Will Be Tested in November. JUNEAU — Alaska’s new election system — with open primaries and ranked voting — has been a model for those in other states who are frustrated by political polarization and a sense that voters lack real choice at the ...
Cheechako
3 days ago
Views: 126 • Comments: 0 • Rating: 0