css - Is there any way of denying .NET controls to style the final HTML element -
I have control which looks something like this:
& lt; Asp: DetailsView id = "duusers" runat = "server" datasource id = "odddata" data name = "id" & gt; ... & lt; / Asp: DetailsView & gt; Finally what is the most external element as & lt; Table & gt; I will create in my CSS:
table tr {border-top: 0; Border-left: 0; Border-right: 0; Border-bottom-width: 1px; } Now when I sang the web page, & lt; Table & gt; will have borders and styles that are due to the default settings for control, which looks like this
& lt; Table cell area = "0" rule = "all" range = "1" id = "ctl00_body_dvUsers" style = "border-fall: collapse;" & Gt; This would obviously override my CSS because it is inline and I do not want it. Is there any way to change all the styling that is done automatically? I think that I can set my code as CSS in many attributes on DetailsView , but I can have a lot of control which ultimately brings the final output to table And I have to configure them all in the same way.
If some designers want to change the style of everyone, then there will be many duplicate codes, and a lot of work will be the table, because I have to go back and change the styles for every control in my theme file.
What is a way to say "Do not mess with styles, I know what I am doing!" ?
View this project. This provides a drop-in solution for converting detail-visual controls (and others) from table-based design to a devil-based design that uses CSS classes instead of inline styles.
For example, this entire headache-inducing code changes:
& Lt; / Tr & gt; & Lt; Tr style = "color: # 333333; background-color: white;" & Gt; & Lt; Td style = "font-weight: bold;" & Gt; Id & lt; / Td> & Lt; TD & gt; 998-72-3567 & lt; / Td> & Lt; / Tr & gt; & Lt; Tr style = "color: # 333333; background color: # F7F6F3;" & Gt; & Lt; Td style = "font-weight: bold;" & Gt; Last name & lt; / Td> & Lt; Td> Bell & lt; / Td> & Lt; / Tr & gt; & Lt; Tr alignment = "center" style = "color: cyan; background color: # 284775;" & Gt; & Lt; Td colspan = "2" & gt; & Lt; Table range = "0" & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Period & gt; 1 & lt; / Span & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; A href = "javascript: __ doPostBack ('ctl00 $ ctl00 $ MainContent $ LiveExample $ DetailsView1', 'Page $ 2')" Style = "Color: Cyan," & gt; 2 & lt; / A & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; Peace and stability in :
& lt; Div class = "PrettyDetailsView" id = "ctl00_ctl00_MainContent_LiveExample_DetailsView1" & gt; & Lt; Div class = "aspen-detail view" & gt; & Lt; Div class = "espanet-detail view-header" & gt; Author Details & lt; / Div & gt; & Lt; Div class = "espanet-detail-view-data" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; Span class = "ASPNET-DetailsView-name" & gt; By ID & lt; / Span & gt; & Lt; Span class = "ASPNET-DetailsView-value" & gt; 998-72-3567 & lt; / Span & gt; & Lt; / Li & gt; & Lt; Li class = "aspen-detail-view-alternative" & gt; & Lt; Span class = "ASPNET-DetailsView-name" & gt; Last name & lt; / Span & gt; & Lt; Span class = "ASPNET-DetailsView-value" & gt; The ringer is & lt; / Span & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; Div class = "espanet-detail-view-endorsement" & gt; & Lt; Span class = "ASPNET-DetailsView-ActivePage" & gt; 1 & lt; / Span & gt; & Lt; A class = "ASPNET-DetailsView-OtherPage" href = "javascript: __ doPostBack ('ctl00 $ ctl00 $ MainContent $ LiveExample $ DetailsView1', 'Page $ 2')" & gt; 2 & lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; I've been using it for a while, highly recommend it.
Comments
Post a Comment