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
- The Good Liars at The Libertarian Convention [VIDEO] The Good Liars visit the Libertarian Convention in Washington DC. They interview presidential candidates, talk to someone who thinks people should be allowed to own nuclear weapons, and Starchild. SUPPORT US: herohero.co SEE THE GOOD LIARS LIVE!NASHVILLE, TN JUNE ...
teleskiguy
2 days ago
Views: 231 • Comments: 0 • Rating: 0 - Adam Conover - How Google RUINED the Internet [VIDEO] Google sucks now. Here's why. Get 20% off DeleteMe US consumer plans when you go to joindeleteme.com and use promo code ADAM at checkout. DeleteMe International Plans: international.joindeleteme.com You may have noticed that Google isn't what it used to ...
teleskiguy
3 days ago
Views: 144 • Comments: 1 • Rating: 0 - What Result Will There Be From the Trump Trial?I did my best to boil this down. What say you?
Rightwingconspirator
3 days ago
Views: 347 • Comments: 0 • Rating: 2 - 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 🌹🏡😷
2 weeks ago
Views: 1,420 • Comments: 2 • Rating: 7 - 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
2 weeks ago
Views: 347 • 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
3 weeks ago
Views: 415 • 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
3 weeks ago
Views: 642 • 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
4 weeks ago
Views: 1,321 • Comments: 0 • Rating: 3 - The Good Liars at the Schnecksville Trump Rally [VIDEO] New theories, great tunes and SHOCKING breaking news. SUPPORT US: herohero.co SEE THE GOOD LIARS LIVE!WASHINGTON D.C. MAY 23RD: unionstage.comNASHVILLE, TN JUNE 6TH: etix.comSAN FRANCISCO, CA JUNE 25TH: livenation.com SUBSCRIBE TO OUR AUDIO PODCAST:Apple Podcasts: podcasts.apple.comSpotify: open.spotify.comJoin this channel ...
teleskiguy
4 weeks ago
Views: 1,177 • Comments: 1 • Rating: 0
- 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
1 weeks ago
Views: 205 • Comments: 0 • Rating: 1