Haha, poor Deb… look, if you use versioning software, you can dare to try some stuff out and if everything totally horribly dies in a fire, you always have your older, “working” version to go back to : )
Re multiple stylesheets:
Won’t back down on this one.
It is much easier for me to debug and conceptualize my code with the different “buckets”. (If I even make it to “Go Live”, I’ll consider cramming things into one or two style-sheets.)
…
Sorry, again, organization and filing versus one style-sheet. (Especially in development.)
Besides, I highly doubt that 5 sheets at 2k is any different than 1 sheet at 10k from a performance standpoint?!
Oh, there’s a performance difference, but dunno if it would matter enough for you to be bothered. Here’s how it works (and it’s the same reason people use image sprites instead of lots of separate little images):
Each stylesheet is a separate request, and each request to the server has a minimum amount of latency. That is, no matter how fast your browser, your internet connection, or the site’s, it always takes a certain minimum of time to have the client (browser) ask for a resource and the server to determine if it has that resource, has permissions to send it, and then to do so. Crusty usually says about 200ms; I have little idea (other than, when I measure it with wget, it’s never instantaneous).
So 5 stylesheets each has a asking-checking-sending thing from the server going on.
All that said you are not alone in finding development a lot easier with separate stylesheets! Drupal does this all the time, as does most CMSes.
So, keep them all separate for ease-of-development on your local copy, but when you upload to “live”, smoosh them all together (in the same order you have now). If they stay in order then they’ll act the same as they act now. This means, one request for styles, your site gets loaded on the user’s machine a bit faster.
Frankly the difference is more measureable when the site is huge. I looked at a site done by a company I was interviewing at and they had, I kid you not, 30 separate stylesheets, plus 5 more stylesheets that came with various jQuery plugins… and almost 30 separate javascript calls.
Later they fixed this so I’m sure it really was that someone was stupid enough to upload the dev version… IE won’t even bother loading stylesheets after the 31st or 32nd one (IE has a limit).
Re: Gilder-Levin image replacement
I Googled that term, but didn’t find anything really helpful.
Care to explain or provide a link to a useful tutorial?
http://www.mezzoblue.com/tests/revised-image-replacement/
the last one.
Gilder-Levin image replacement is what we use to place an image on top of text. If the image doesn’t load, the text is sitting right there and styled however you like. If the image does load, it sits right on top of the text and covers it. It’s nice. You see he mentions it’s not going to work if the image is semi-transparent. It also won’t work if the image is way smaller than your text.
Frankly, I don’t see anything wrong with
<h1><img src=“debbie.png” width=“whatever” height=“whatever” alt=“Debbie”></h1> if on the main page that is your h1. Any user agent who doesn’t load the image basically gets
<h1>Debbie</h1>
since that’s how alt text is supposed to work. However, you won’t really be able to style that text for those with CSS on but images off (except in Mozilla) and Gilder-Levin lets you do that.
Re id on the h1:
Not true.
My strategy is to have <h1> be my Company Name (e.g. “Debbie’s Small-Business Central”) on the Home Page, however, every other page will have a different <h1> which will most likely be the title of the article.
Okay, if you have an id on this h1 because it will be styled different from all other h1s throughought the site, then yeah, it does make sense to put an id on this one. Take Crusty’s words to mean “in general” because it’s not uncommon for people to put id’s on all their h1’s.
Another option is to have the id on something else, like the body, if the main page had plenty of things that were different.
Re: clearfix
Had a thread going with Paul O’ and others about this a week or two ago. (Never got the answers I really wanted.)
If you can look at my 3-column layout and tell me how to remove ClearFix and not break things I am here to listen…
Mostly, you don’t have to worry about it. Crusty hates clearfix technique because it’s way more code than all the other float clearing/enclosing methods out there, and frankly that’s all you care about: floats remain in their containers instead of popping out and stuff riding up all over everywhere like a bad wedgie.
I usually tend to use a combination of haslayout for IE and overflow: hidden. Sometimes I can’t afford to hide overflow so since I usually still have Haslayout triggered I do just use a version of clearfix using :after, where all I do is make no character (content: “”;), make it a block and clear: both. Still much smaller than the original clearfix, which took into account IE for Mac, IE5 and 6, and went out of its way to trigger Haslayout in some hidden way. A lot of the time you already have Layout because the box has a width or something anyway.
Paul O’B also only uses clearfix when all the other methods aren’t suitable or cause more problems than they solve.
http://stommepoes.nl/floaties.html I think I’ve listed most of them here, except the Yahoo one with a :before and :after and display: table and all that junk. Then they go adding “zoom:1” to stuff which to me is retarded, since we’ve already dealt with Haslayout somewhere.
You’re not breaking anything using clearfix, it’s just a wordier way of clearing/enclosing floats. You can safely leave it.
Re the sidebars:
You lost me here…
1.) Won’t using em’s on my page layout break Paul O’s “masterpiece”?!
They don’t have to. In fact, if you decide you want to go along with Crusty’s suggestion of the middle part first, you can do it pretty easily. I assume Crusty is thinking of the “Holy Grail” layout. I’ll outline it further down.
2.) I am on a MacBook with FF8 and I can hit command + until things are as big as they get and nothing breaks in my layout…
You’re zooming. So is Crusty. But Crusty is zooming on a machine whose own system fonts are ginormous.
I don’t zoom, because I hate zoom most of the time (if there are any images, I hate zoom, because it makes the images large and blurry which always gives me a headache. If I’m zooming in, it’s because I can’t read the text, so let me enlarge the text!)… (directed at browser makers who only make the retarded zoom)
3.) “Both sidebars are WAY too tiny to have such large dynamic fonts inside them…”
I don’t understand what you mean?!
Your sidebars are small. There is text in there that easily gets so large that it disappears on some machines (ours). If text has the ability to grow a lot and it’s already pretty big, then small-width containers can be a problem. I can show a Holy-Grail version with ems where at least the boxes would also get bigger (at some point, they’d get so big the middle would be squashed, but that would be extreme text-enlarge). If you have a mobile stylesheet and mobile-first setup, then actually Opera and other browsers will, if the user zooms in too much, actually switch to the mobile stylesheet. This is one plus of zooming browsers, and is really nice to read big text on.
(an example, open Opera and zoom the hell out of this page and you’ll see Opera switch because there’ll be no more images)
Again, not following you. My layout has worked fine in FF3.5 and FF8 for me.
When you test your site, first try to set your fonts (on your computer, somewhere there’s a place you can change the “default” font setting for most of your applications) a few times bigger than what you have now. Most pages if well-built should only look a little funny, but nothing important should overlap or get cut off.
The reason MY firefox shows stuff bigger is, Firefox is one browser who will accept the “Application Settings” fonts I set in my windowing system (this machine is running the XFCE desktop environment, which is based on Gnome, on Debian) so it’ll make text larger like it does in my music-playing program Banshee, my graphical text editor gEdit, and even my Terminal application (real terminals are tiny on this thing). Now Opera and Chrome don’t bother looking at my desktop settings so your page probably fits better on those (I didn’t check, sorry) and then those both zoom, so everything would fit the same way except just bigger.
So this “problem” hits only people who have a different default font setting either in their browser (chrome for example does not offer this option, which some google employees have complained about) or further up where the browser will accept those settings. Zooming can’t fix this for them, but the site can accommodate these people a bit more.
I’m concerned about these comments… I spent AGES getting my base page “template” exactly like it needs to be to work, and I thought that Paul O’ all but blessed it…
You could make it absolutely perfect and there would be critical feedback. We assumed you wanted it : ) But it’s YOUR site, and YOU get to make all the final decisions on it. For the most part, your site certainly isn’t worse than most other web pages out there, nobody’s going to die from it, and you can pick and choose any improvements you want to make. If you try something and it breaks, or you don’t like the effect, go back to what you had. It’s not a huge deal.
(unless you like Crusty’s rewrite, in which case, you ought to be able to easily plug his into your pages and it should Just Work anyways)
Re content-first:
Using position: relative or something?
Again, won’t that break my page layout?
It’s too bad the site that used to show 40 examples of Holy Grail is gone, or at least, I can’t find them anymore. Though there are two decent ways to do middle-first (or content-first, when the assumption is the sidebars are less important).
What is the ROI on doing that?
If your sidebars are considered less-important than the middle section (where most sites put the meat), getting that as first originally was a benefit to search index because long ago the spiders actually had a limit in how far into a page they’d index.
This isn’t true anymore, but it does still help insure that if a bot does for whatever reason leave a page before it has finished indexing (esp if on each page the sidebar material is the same, which for many sites it is), it will have grabbed the meatiest part first.
More importantly it’s nicer for anyone browsing linearly like in a text browser or a screen reader where the user doesn’t realise they can navigate where they want without needing to tab everywhere. Sighted keyboarders don’t have the luxury of a screen reader’s navigation capabilities.
Lastly, printing rocks, if you want the sidebar content to be printed out, but the meat first, you’ve already got the source-order you need.
It will just please people like you and your reading style?
Visually it should look exactly the same, which is what’s cool about it (site looks how you want, but meat comes first). Also heading level order.
It will take me to #1 of Google?
Frankly, despite what I mentioned above about search spiders, there is a dark SEO claim that it will help rankings, but it won’t. It’s really more for a small segment of your human visitors and catches the off-chance that a spider only comes once and gets interrupted (or follows a link and never comes back) or whatever. It seems pages get indexed often and regularly though.
Also, you are assuming that I want the Middle Column first…
I sorta thought “Featured Article” was a 1st choice?
Well, visually you’re implying the small business facts is the most important. The text is biggest, it’s in the Easy Center (grabs most of the first attention on the page), and visually, if you asked me “what is this page mostly about?” I’d say “small business facts, and some other business-related stuff.” Likely most other people would think the same.
If the Featured Article is the most important chunk of the page (it seems to me to be more of something between a “testimonial” and a “story where the product helps a customer”), you’re telling my eyes it’s very minor.
Newspapers put the stuff they want to scream out in the middle. They put ads for the local car wash Super Saturday Sale in little side columns in small text.
Your markup will say the Featured Article is fairly important; your CSS is telling me it isn’t. So I’m a little surprised it’s not taking up center stage, but you may have a reason for that…
And if I wanted to make money by giving Small-Business Workshops, then that might be 1st?
If that’s the point of the site, say it! Start off with your most-important section (and give it Center Stage!) stating the (potential) client’s problems: want to start your own business but don’t know where to start? Think you’re just a housewife so you could never fulfill your dream? Go for it! With my help!
-I help people start their small-business dreams get started with informative workshops blah blah…
(cue Pamela) See this woman? She’d lay around her house in a housecoat with rollers in her hair smoking cigarrettes and watching Matlock and Golden Girls all day while her 16 cats peed on everything. Today, she’s running her own business! (link) READ PAMELA’S AWESOME SUCCESS STORY!(/link).
That kinda thing. It seems your site wants to be a general resource for your target audience, but if it’s also mostly where YOU are helping OTHERS and that’s your SERVICE, make that the most important thing! Both in the markup, AND visually!
(again, remember this is the opinion of some random person on teh interwebs)
Re <!-- excessive comments –>
Well smarty pants, I use NetBeans and it shades all comments gray. As such, I add a comment before all logical sections so I can scan my code for the color gray and easily read my code…
Crusty can’t stand different colours in his code, so he won’t understand how it helps you so much.
But like with the multiple stylesheets, you could still serve the deployment version without the comments.
Re comment rendering bug:
What is a “rendering bug”???
http://www.adrianpelletier.com/2007/11/25/decoy-fix-for-ie-duplicate-characters-bug/
He links to the PositionIsEverything explanation, which at the time they thought was only IE6 but it also hits IE7 too.
It has nothing to do with Layout.
It has to do (partially) with how IE6 and 7 think comments are part of the DOM. Here’s an example.
If you’d like to see what it looks like, I once managed to trigger it by having hidden stuff between floated elements (div) in a form.
Frankly, it’s not something you’ll see terribly often, especially as IE6 and 7 usage go down. But you should be aware of it. I avoid the problem by not having comments between floats by pretty much not having comments at all in the deployed versions.
I’m using em’s all the way through.
Yay!
I don’t see how changing from fixed-width Left & Right Columns using pixels to em’s would blow up Paul o’s layout?!
Not if the middle part can also deal with ems. They could all share the same sandbox without someone playing “cat”.
Re definition lists (and to make it very clear: I love definition lists, but I don’t think they’re helping you here at all and would remove them):
Okay. (Think the Search Engines would like that better too?)
They won’t care either way, except that the dl adds a bit more code per amount of content. Which, your page isn’t dense enough to make anything measureable for a spider anyway (Crusty’s always going on and on about Code to Content Ratio, and I think it does matter (you always want the least amount of code to present the content you want), but I don’t think it’s a huge deal here).
While a dt->dd setup is supposed to show a “term-and-definition”-type of relationship (which I believe a Q &A is, or an FAQ), even screen readers don’t get any real association between the two, search engines likely nothing, and inside your dl you have heading-paragraph pairs which are giving ALL the relational information you want to show anyway.
Screen readers and search engines know what headings are (and actually Opera users can also navigate by headings!) and here, it looks like that’s all you need. I don’t believe a dl is reinforcing that idea more.
Re padding reset:
Sure I won’t blow up all of my work thusfar? (Sounds pretty risky to me…)
It’s true that if a disaster is going to hit you, it’s most likely when you change a reset after a page is mostly written rather than before you write any styles, but you can always try it. Either you have ctrl-z or u to undo and/or versioning software to let you go back anyways, if it totally destroys everything.
But you can keep the
- {
margin: 0;
}
if you want: your styles are written for it and while it’s a very heavy selector, whatever. Users won’t notice. The problem with forms is just the padding. And as I said, most inlines don’t even have padding, and neither do heading tags (h1-6) nor divs.
You can try copying this and see if anything explodes:
- {margin: 0;}
html, body, ol, ul, dd, th, td, fieldset, legend, p {padding: 0;}
And you may not even need that much, if you don’t have tiny tables, don’t want to really style legends (mostly removing the padding from legend meant it didn’t leave a little gap behind when I absolutely-positioned it offscreen, for when I’m making accessible-but-redundant legends… a gap you only see if you let the fieldset have a border anyway).
Re current-page highlight:
It’s really obvious, for one (I like obviousness in user-centric design), and I like the colours. I often (not always, but most of the time) have the same highlight for hover, focus, and current page. The plus with this is it also reinforces to users who mouseover/focus on the menu item that leads to the current page that they’re already there (they don’t get any noticeable highlight because… it’s already highlighted, cause they’re already there) which is considered good usability (some UX even say “take the link out” but I don’t bother).
What color would use use assuming hyperlinks stay blue?
I dunno, I suck at combining colours. If you want to extend the girlyness of your menu you could use one of those, but you’d really want to ask one of the more artsy people around here.
I was using red for Facts, but wondered if that was too “loud”?!
Yeah, and also, red and black are very commonly seen on the Get Rich Quick SEO crap sites. They all have that “look” and you wouldn’t want to inadvertantly imitate it. Any other dark colour but red.
Next post, so I don’t lose all this, will be center-first if you want to try it. Or Crusty will beat me to it.