CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 4/20/2007 7:27:41 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 21 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
chrvanleeuwe
Asp.Net User
Wrapper div4/20/2007 7:27:41 AM

0/0

Why do the CSS Friendly adapter introduce a wrapper-div?

<div class="AspNet-GridView" id="panel1_MyGridView">

This goes against the idea of structural markup (the extra div add's has no meaning). So why is it rendered? I can only gues this is because of a ASP.NET dependancy of some sort?

 Please let me know, because I realy like this project!

 

 

 

bdemarzo
Asp.Net User
Re: Wrapper div4/20/2007 1:01:08 PM

0/0

It is not an ASP.Net dependency. The DIVs do have meaning -- they define boundaries of a block of markup, and the block of markup is the code generated by the ASP.Net control. They have purpose, too -- you can easily use DIVs to better facilitate using JavaScript and CSS.

Take two examples -- one where the <table /> created by a GridView has no <div /> wrapper, and one that does not. Now let's say you want to style only those tables which are created by an ASP.Net GridView. Without the wrapper, you would define a CSS class, and assign it to each GridView using the CssClass property. With the wrapper, you can define it all in CSS, saving a step and (arguably) avoiding the potential mistake of forgetting to assign the CssClass property.

In other words, wrappers make you do this:

div.AspNet-GridView table {
    ...
}

... as opposed to this:

table.myTableClass {
    ...
}

Maybe it's a matter of personal preference, but the wrapper lets you do both, and is far from being "wrong" from an XHTML perspective.

Hope this helps! 


- brian
- blog: www.sidesofmarch.com
chrvanleeuwe
Asp.Net User
Re: Wrapper div4/20/2007 3:03:26 PM

0/0

Thanks for you quick reply brian!

From the structural markup point of view, an element should have an id or class to descripbe their content and/or function. The fact ASP.NET rendered this markup does none of these.

When a developer/webdesigner needs an extra hook to attach something (being javascript or css), there is always the posibility to manualy add an id, class or wrapper-div. Extra markup will only decrease readability and increase filesize.

The fact that this bothers me is that the CSS Friendly adapters realy improves ASP.NET's markup, and this looks like a step in the oposite direction.

bdemarzo
Asp.Net User
Re: Wrapper div4/20/2007 4:12:57 PM

0/0

I'd be interested to see Russ's opinion on this. ;)

- brian
- blog: www.sidesofmarch.com
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
The Essential Guide to Dreamweaver CS3 with CSS, Ajax, and PHP Authors: David Powers, Pages: 784, Published: 2007
CSS: The Missing Manual Authors: David Sawyer McFarland, David McFarland, Pages: 476, Published: 2006
Beginning CSS: Cascading Style Sheets for Web Design Authors: Richard York, Pages: 630, Published: 2007
Web Standards Creativity: Innovations in Web Design with XHTML, CSS, and DOM Scripting Authors: Cameron Adams, Andy Clarke, Mark Boulton, Simon Collison, Pages: 266, Published: 2007
CSS Instant Results Authors: Richard York, Pages: 383, Published: 2006
Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional Authors: Andre Lewis, Michael Purvis, Jeffrey Sambells, Cameron Turner, Pages: 365, Published: 2007
Pro CSS Techniques: Real-world CSS Techniques for Real World CSS Professionals! Authors: Jeff Croft, Ian Lloyd, Dan Rubin, Pages: 376, Published: 2006
Foundation PHP for Dreamweaver 8 Authors: David Powers, Pages: 510, Published: 2005
Pro JavaScript Techniques Authors: John Resig, Pages: 359, Published: 2006
Web Designer's Reference: An Integrated Approach to Web Design with XHTML and CSS Authors: Craig Grannell, Pages: 389, Published: 2004

Web:
Do You Want To Do That With CSS? — Centering a Wrapper Essentially, a wrapper is nothing more than a generic
element that usually ... This wrapper div provides a way to constrain the width of the page ...
Adobe - Developer Center : Designing with CSS – Part 3: Creating ... The function of a wrapper div is to act as container element for all ... I show you how to add the wrapper div into your basiclayout.html page in the ...
Web Teacher › Tip: What is a Wrapper Div? Tip: What is a Wrapper Div? One of the listservs I read regularly recently had ... A wrapper is an element, commonly a div, that encloses one or more other ...
Centering a webpage without the wrapper div Dec 22, 2005 ... Well, the sole purpose of the wrapper div is to give IE5 the support it needs to center correctly; so if you’re anything like me (or ...
CSS Creator [Solved] wrapper div isnt showing behind in fire fox before I start the site I am talking about is at http://dopserv1.com/hosted/army / If you look at it in fire fox, you can see the black ...
Wrapper Div and all it's contents not Showing in IE6. But shows in FF wrapper div and all its contents not showing in ie6. but shows in ff.
Beauty in Design - Re:CSS wrapper div - Beauty In Design Community I've looked at other Joomla CSS templates and some of them appear to use a wrapper div as well. Is this a personal coding preference or is ...
Point/Counterpoint: The Wrapper Div // Ordered List // We Make The ... Point: The wrapper div (a generic div element placed just inside the body, encasing all other elements) can be an effective way of producing a sub- body ...
Dreamweaver behavior with wrapper DIV - Graphic Design Forum and ... I'm using Dreaweaver CS3.0 on Mac. Here is the site: http://www.testing. greenhammerconstr...com/test.shtml Here is problem. I have a wrapper div for borders ...
CSS tutorials - CSS An Introduction - Part Thirteen: Working With ... In this tutorial, we will look at understanding some of the methods that are used in positional CSS, specifically the container or wrapper div we see and ...

Videos:
thedigitalprofessor_PageWrapper In this tutorial thedigitalprofessor will demonstrate how to set up a page wrapper using CSS & a DIV tag; ONE EARTH SPIRIT plays some guitar along w...
Back n' Black Enash131 is back with some new CSS tutorials...




Search This Site:










css control adapters sucks ... what is going on?

asp menu and cssclass property

problem with css adapters and iis

browser definition files - restrict to certain folders only

i need build "repeatlayout" support myself?

menu css adapter and sqlsitemapprovider

select treeviewnode

using cssfca in custom web controls

error on treeview: would be it a bug?

status bar - onmouseover

loginadapter cssfriendly

variable width of horizontal top level menu elements?

how to implement the adapters in a web application project?

gridview. header style. please, help me out. this is driving me nuts.

treeview style help

bug? login control fires onloggedin and onloginerror twice with css friendly adapters

web.sitemap usage

fixing the checkboxlist so that checkboxlist.enabled = false; and checkboxlistitem.enabled = false; disables the checkboxes.

login failed

emptygridview and the gridviewadapter

formview only displays controls

how can i get wrapped text in a detailsview boundtext item to start just below the heading.

dodgey formatting

serving suggestion

vscontentintaller crashes when installing

css cascade problem

createuserwizard does not allow me to create a new user

panel using css adapters

in css friendly vertical menu submenu should scroll above flash animation

asp.net ajax-enabled web site vs asp.net css friendly web site

  Privacy | Contact Us
All Times Are GMT