<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CSS Friendly Control Adapters</title><link>http://forums.asp.net/1018.aspx</link><description>Discuss the CSS Friendly Control Adapters sample project, ask questions, post bugs, etc</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: ANNOUNCEMENT: Beta 3 has been released</title><link>http://forums.asp.net/thread/1494952.aspx</link><pubDate>Tue, 12 Dec 2006 21:05:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1494952</guid><dc:creator>Falcon</dc:creator><author>Falcon</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1494952.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=1494952</wfw:commentRss><description>&lt;p&gt;Haha! I apologize for taking so long to get these examples to you. I've been in the rush leading up to finals at uni for the past month or so. (And thanks again for the work you've done on the adapters! My fellow student workers and I were having to write a lot of code by hand since the controls output HTML we couldn't use. I asked my boss "What's the point of using .NET then?" one day...&amp;nbsp; and guess who got the project to adapt all of the controls? =P&amp;nbsp; Anyway, since then it's been a huge time saver to be able to use the built-in ASP.NET controls.)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Alright, here's the relevant part of the sample.css file:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="cmt"&gt;/* This is the main "same line CSS" */&lt;/span&gt;

&lt;span class="sel"&gt;form dl&lt;/span&gt;, &lt;span class="sel"&gt;form fieldset dl&lt;/span&gt;, &lt;span class="sel"&gt;form div dl&lt;/span&gt; {
	float:&lt;span class="val"&gt; left&lt;/span&gt;; 
	width:&lt;span class="val"&gt; &lt;span class="unit"&gt;100&lt;/span&gt;%&lt;/span&gt;;  /* Only necessary for IE */
	padding:&lt;span class="val"&gt; &lt;span class="unit"&gt;0&lt;/span&gt;&lt;/span&gt;;
	padding-bottom:&lt;span class="val"&gt; &lt;span class="unit"&gt;1&lt;/span&gt;px&lt;/span&gt;;
	}

&lt;span class="sel"&gt;form dt&lt;/span&gt;, &lt;span class="sel"&gt;form div dt&lt;/span&gt; {
	margin:&lt;span class="val"&gt; &lt;span class="unit"&gt;0 5&lt;/span&gt;px &lt;span class="unit"&gt;5&lt;/span&gt;px &lt;span class="unit"&gt;0&lt;/span&gt;&lt;/span&gt;;
	clear:&lt;span class="val"&gt; both&lt;/span&gt;;
	float:&lt;span class="val"&gt; left&lt;/span&gt;; 
	text-align:&lt;span class="val"&gt; right&lt;/span&gt;;
	width:&lt;span class="val"&gt; &lt;span class="unit"&gt;150&lt;/span&gt;px&lt;/span&gt;;	&lt;span class="cmt"&gt;/* To avoid IE bug, the width of dt is set below width of any column */&lt;/span&gt;
	}

&lt;span class="sel"&gt;form dd&lt;/span&gt;, &lt;span class="sel"&gt;form div dd&lt;/span&gt; {
	margin:&lt;span class="val"&gt; &lt;span class="unit"&gt;0 0 10&lt;/span&gt;px &lt;span class="unit"&gt;0&lt;/span&gt;&lt;/span&gt;;
	float:&lt;span class="val"&gt; left&lt;/span&gt;;
	width:&lt;span class="val"&gt; &lt;span class="unit"&gt;80&lt;/span&gt;%&lt;/span&gt;; &lt;span class="cmt"&gt;/* Sigh. IE needs this width or it blows up. Firefox, Opera and Safari all behave correctly. */&lt;/span&gt;
	}

&lt;span class="cmt"&gt;/* The same line CSS ends here */&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;The width: 100% on the dl and the width: 80% in the dd section are not needed for any other browser but IE. Without a specific width set, IE will not clear the floats even with clear: both set, which is incorrect behavior according to http://www.w3.org/TR/CSS21/visuren.html#flow-control:&lt;/p&gt;&lt;p&gt;&amp;nbsp;"When the [clear] property is set on floating elements, it results in a
modification of the rules for
positioning the float. An extra constraint (#10) is added:
&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;The top outer edge 
of the float must be below the bottom outer
edge of all earlier left-floating boxes (in the case of 'clear:
left'), or all earlier right-floating boxes (in the case of 'clear:
right'), or both ('clear: both')."&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The W3C spec says that floats with clears should be pushed downward. IE, without a specific width set, is putting some floats adjacent to other floats, which is clearly against the spec. By setting clear: both on the dt, which is the first element in every row, the dt and dd should be getting pushed to the next line by default, creating one dt/dd pair per row. This rule of CSS would make the problem of putting the dts and dds on the same line painfully simple, but IE needing the width means that the proper width would either have to be calculated or input by the user.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A bit old, but still relevant: http://agachi.name/weblog/archives/2005/06/09/clearing-floats-into-rows.htm and http://agachi.name/tests/clearing-floats-into-rows.htm&lt;/p&gt;&lt;p&gt;I've added &lt;a href="http://www.lemonrage.com/nate/css/cssadapterexample/iefloatsample.html" target="_blank"&gt;http://www.lemonrage.com/nate/css/cssadapterexample/iefloatsample.html&lt;/a&gt; which when viewed in IE6 or IE7 shows what happens without a width set, but when viewed in any recent version of Firefox and Opera shows what should happen according to the W3C spec. =) It just has the width rules in the dl and dd sections removed.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: ANNOUNCEMENT: Beta 3 has been released</title><link>http://forums.asp.net/thread/1494830.aspx</link><pubDate>Tue, 12 Dec 2006 19:40:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1494830</guid><dc:creator>Russ Helfand</dc:creator><author>Russ Helfand</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1494830.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=1494830</wfw:commentRss><description>&lt;p&gt;Hey, Falcon, thanks for posting this.&amp;nbsp; Indeed, I had thought you'd gone "dark" on me since I didn't hear from you recently.&amp;nbsp; Good to see you are still there!&lt;/p&gt;
&lt;p&gt;My rule of thumb with floats is that I always assign them a width.&amp;nbsp;Is that what you are finding that you need to do, too? If so, I guess I don't really consider it a bug in one or another browsers. It would be nice if you could somehow reliably say (in CSS) the width of this (block) floated element should be as wide as it needs to be and no wider... but I don't think it works that way. Ha ha.&lt;/p&gt;
&lt;p&gt;Can you share your perspective and experience on this?&amp;nbsp; If you post some of your CSS and point out where you had to add explicit widths, we can talk about those cases specifically.&lt;/p&gt;</description></item><item><title>Re: ANNOUNCEMENT: Beta 3 has been released</title><link>http://forums.asp.net/thread/1494540.aspx</link><pubDate>Tue, 12 Dec 2006 15:05:36 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1494540</guid><dc:creator>Falcon</dc:creator><author>Falcon</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1494540.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=1494540</wfw:commentRss><description>&lt;p&gt;Hey Russ!&lt;/p&gt;&lt;p&gt;I tried e-mailing you the examples but your e-mail didn't like whatever character set Gmail tried to use to send it and it bounced back. (Not sure if that had to do with the attachments or what)&lt;/p&gt;&lt;p&gt;Anyway:&lt;/p&gt;&lt;p&gt;http://www.lemonrage.com/nate/css/cssadapterexample/index.html is an example of a dl dt dd adapted DetailsView. Forgive the incorrect IDs on some of the labels. I need to fix my automatic label generation in our adapter a bit.&lt;/p&gt;&lt;p&gt;Unfortunately, IE has major trouble dealing with floats correctly, even in version 7. A couple of the widths in the CSS are just so IE will display everything properly. Firefox, Safari, and Opera all behave correctly and deal with the floats correctly without the widths. I'm not sure of the best way to handle that, since the widths will probably need to change for different layouts for IE. The other 3 major browsers will be able to adapt to virtually any layout without any width changes.&lt;/p&gt;&lt;p&gt;Any ideas you have on that matter would be appreciated! =)&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: ANNOUNCEMENT: Beta 3 has been released</title><link>http://forums.asp.net/thread/1460837.aspx</link><pubDate>Fri, 10 Nov 2006 22:31:50 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1460837</guid><dc:creator>Russ Helfand</dc:creator><author>Russ Helfand</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1460837.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=1460837</wfw:commentRss><description>&lt;p&gt;Hi Falcon,&lt;/p&gt;
&lt;p&gt;I'd like to take you up on your offer of sharing your markup and CSS.&amp;nbsp; Can you please post both here or send them directly to me (&lt;a href="mailto:rhelfand@groovybits.com"&gt;rhelfand@groovybits.com&lt;/a&gt;).&amp;nbsp;&amp;nbsp;I'm trying to avoid major shake-ups in the next rev but if I can find a&amp;nbsp;safe/stable way to integrate&amp;nbsp;your ideas into the next rev I'll try mightily to do so.&amp;nbsp; Fair enough?&lt;/p&gt;</description></item><item><title>Re: ANNOUNCEMENT: Beta 3 has been released</title><link>http://forums.asp.net/thread/1448075.aspx</link><pubDate>Tue, 31 Oct 2006 15:39:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1448075</guid><dc:creator>Falcon</dc:creator><author>Falcon</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1448075.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=1448075</wfw:commentRss><description>&lt;p&gt;(Gah, I wish these forums had an edit button! =P)&lt;/p&gt;&lt;p&gt;&amp;nbsp;Just as a clarification, the main problem was that DetailsView doesn&amp;#39;t output labels for BoundFields, meaning that we had to switch to TemplateFields for everything even though we didn&amp;#39;t want any other changes to the look or functionality other than labels for form elements. The label change allows those of us who have to conform to things like section 508 the ability to use DataBound controls without modification.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: ANNOUNCEMENT: Beta 3 has been released</title><link>http://forums.asp.net/thread/1448072.aspx</link><pubDate>Tue, 31 Oct 2006 15:36:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1448072</guid><dc:creator>Falcon</dc:creator><author>Falcon</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1448072.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=1448072</wfw:commentRss><description>&lt;p&gt;Hi Russ!&lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks for all of the time and hard work you&amp;#39;ve put in to these adapters. I was pretty amazed with how fast version Beta 3 of the kit came out after Beta 2.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I&amp;#39;m not sure if you&amp;#39;re still considering it, but I would highly recommend rendering controls like DetailsView as a definition list. It makes a lot more sense than two spans semantically, and it&amp;#39;s easier to get to each part with CSS. We&amp;#39;re currently using it that way on my university&amp;#39;s projects, and I&amp;#39;d be more than happy to give you the CSS we use to display the dt and dd on the same line (basically, floating with the dt clearing). &lt;/p&gt;&lt;p&gt;Another thing to consider is automatically generating labels in DetailsView (especially for DataBound controls). The solution we used is when there&amp;#39;s exactly one non-text/non-literal control, output a label for that control using the HeaderText (in the dt in our case). Otherwise, display HeaderText normally without using a label. This is a relatively easy improvement that makes DetailsView form elements accessible. In my opinion, this should be the way it works by default on BoundFields. A case could probably be made both ways once you start using TemplateFields, since at that point you can input the labels yourself. Before modification, we had to use TemplateFields to input labels for every single DetailsView just to meet our accessibility requirements. It&amp;#39;s much more efficient and less error-prone to handle all of that in the adapter.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Anyway, thanks again! Looking forward to the final revision, and I&amp;#39;m sure you are too!&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>ANNOUNCEMENT: Beta 3 has been released</title><link>http://forums.asp.net/thread/1439392.aspx</link><pubDate>Tue, 24 Oct 2006 15:17:39 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1439392</guid><dc:creator>Russ Helfand</dc:creator><author>Russ Helfand</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1439392.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=1439392</wfw:commentRss><description>&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;I&amp;#39;m pleased to announce that&amp;nbsp;we have&amp;nbsp;upgraded the CSS Friendly ASP.NET 2.0 Control Adapter kit.&amp;nbsp; The new release is&amp;nbsp;Beta 3.&lt;/span&gt;&lt;/font&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;The whole kit now serves as a sample of designing markup and CSS that scales gracefully. This includes scaling of the menus, trees and forms.&lt;/span&gt;&lt;/font&gt; &lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;All forms rendered by the adapters (think: membership controls) now implement a solution for the accesskey issue. It&amp;rsquo;s simple but incredibly effective&amp;hellip; and totally addictive.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;There are other things in beta 3 besides accessibility improvements. The TreeView adapter now restores the tree&amp;rsquo;s expansion state. That&amp;rsquo;s a huge usability improvement but more importantly it&amp;rsquo;s our first demonstration of an adapter that leverages the ASP.NET view state framework.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;To get familiar with all the new features, please read the &amp;quot;what&amp;#39;s new&amp;quot; section of the kit&amp;#39;s home page at &lt;a href="http://www.asp.net/cssadapters"&gt;http://www.asp.net/cssadapters&lt;/a&gt;.&amp;nbsp;&amp;nbsp;Also, try out the &amp;quot;quick cool demos&amp;quot; listed in that section.&amp;nbsp; They are:&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;font face="Arial" size="2"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;li&gt;Go to the &lt;a href="http://www.asp.net/CSSAdapters/Menu.aspx" title="Menu sample"&gt;Menu&lt;/a&gt; sample. Increase your browser&amp;#39;s font size. In Internet Explorer use &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;Text Size&lt;/strong&gt; &amp;gt; &lt;strong&gt;Larger&lt;/strong&gt;. &lt;/li&gt;&lt;li&gt;Go to the &lt;a href="http://www.asp.net/CSSAdapters/Membership/CreateUserWizard.aspx" title="CreateUserWizard sample"&gt;CreateUserWizard&lt;/a&gt; sample. Navigate with accesskeys. If using Windows, press Alt + e to set the focus to the textbox for the Email address. (In Internet Explorer you must also hold down the Shift key to use the accesskey for the password textbox.) &lt;/li&gt;&lt;li&gt;Try out the redesigned &lt;a href="http://www.asp.net/CSSAdapters/TreeView.aspx" title="TreeView sample"&gt;TreeView&lt;/a&gt; sample. Expand several nodes in the tree. Select a node to cause the page to post back. Notice that the tree maintains its expansion, visibly marks the selected node and uses its value to change the page&amp;#39;s sample content. &lt;/li&gt;&lt;li&gt;Play with &lt;a href="http://www.asp.net/CSSAdapters/WalkThru/CascadingCheckboxTreeView.aspx" title="cascading checkboxes"&gt;cascading checkboxes&lt;/a&gt;. &lt;/li&gt;&lt;li&gt;&lt;a href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.asp.net%2Fcssadapters%2Fmenu.aspx" title="Validate the Menu sample"&gt;Validate&lt;/a&gt; that these pages conform to the XHTML 1.1 Strict standard.&lt;/li&gt;&lt;p&gt;Best regards,&lt;/p&gt;&lt;/span&gt;&lt;/font&gt;</description></item></channel></rss>