I think I mentioned in a previous post (but I won't look right now) that I'd like to rearrange the column layout on some pages. The narrow left column is fine as it is. It now holds the partner links and will eventually get a few menu items above them. (And, hopefuly, someday, some paid ads). It's defined on the master page, and I'm inclined to keep it pretty much as is.
But the right-side column doesn't work in many cases. It's too wide for a 120px Google "skyscraper" ad, but too narrow for their mid-size ads. I think it really needs to be different sizes on different page groups.
But how to do that? In my rumination for the last few days, I thought of defining sub-master pages with different column widths, but that somehow struck me as inelegant.
But I just had an epiphany that I haven't tried yet, but I'm pretty sure will work well: Define the right-column div inside the center div. Float it to the right, but set the style definition so that the column width can be changed on different pages. (Not sure how, just yet. (Possibility: Offer a ContentPlaceHolder with a small set of different widths defined. A page would then set the column width by choosing the appropriate Content Id.))
I suspect this will cause some heartache in Firefox because of the obnoxious way that it (and, therefore, I assume w3c handles contained divs. I'm sure I'll have to do another kludge for Firefox like the obnoxious column that enclosed the whole page purely for the sake of Firefox/w3c oddities.
[[Update 10/20]] As Emily used to say, "Well... Never mind." That notion was based on a misconception of master pages. Since I hadn't really taken the time to build a few pages from scratch in asp.net 2.0, I was a bit unclear on the whole (wonderful) system.
Just a couple of test pages made it all clear.
I have this currently:
<div id="SqwBodyRight">
<asp:ContentPlaceHolder ID="BodyContentRight" runat="server" />
</div>
I thought I might be able to do this
<asp:ContentPlaceHolder ID="BodyContentRight" runat="server" >
<div id="SqwBodyRight">
</div>
</asp:ContentPlaceHolder>
and not get the #SqwBodyRight added to the child page. It doesn't work that way. Any markup anywhere on the master page is included on the child page. Doing it the second way is a mistake because content placed in "BodyContentRight" wouldn't be properly enclosed within the #SqwBodyRight div.
I've probably read that somewhere, but it hadn't sunk in.
Latest alternative rumination:
I think it might be better to use the CSS cascade for this.
Create a small css file that redefines only the widths of, say #sqwBodyCenter and #sqwBodyRight. Load those alternative definitions as the final css when the right-column width needs to be changed. Off to try that.
[Update: 10/21] This, of course, is an example of why one shouldn't put such ruminations on public display because the idea that started this post mostly just indicated my misunderstanding of the way master pages work.
But there's this good point: Trying it out forced me to write a test.Master and a testPage.aspx which reinforced what I'd read but didn't understand about the system. Dumb mistakes like that are often a useful step on the way to finding out how something works, I've found.
And I'm a bit embarrassed that I didn't hit on the css solution right away. Despite it's oddities, that's an aspect of this whole thing that I understand pretty well. The css solution is implemented and working even though most pages are using the same old default column scheme. I did put in a narrower right column for the taglist, however, and it's working out just fine.