0

I am relatively new to website design and specifically working in ASP.NET, i am using CSS to style my site, but when i use ASP.NET Controls like GridView, Navigation controls, etc ... they are messed up by the style sheets, and you can't see that until you run the website, because the controls are translated to HTML and so affected by CSS in a way that you can't predict, how to solve this, and is there a better way to layout and desgin sites in ASP.NET.

1
  • The controls always render as the same html elements, so I think the best approach is to target the html using css. Just look in the source to see what type of html it creates... Commented Apr 6, 2012 at 4:36

2 Answers 2

2

You can use ControlAdapters or better use ASP.NET MVC

Sign up to request clarification or add additional context in comments.

Comments

1

A great method that's worked well for me is to create Skins for your ASP.NET controls.

http://msdn.microsoft.com/en-us/library/ykzx33wh.aspx

http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-skins-with-css-for-a-flexible-and-maintainable-aspnet-web-site

After getting my skins and CSS classes created for the different pieces of my ASP.NET controls I'll then run my app in a browser with good developer tools, Google Chrome has a stellar set of dev tools that allow you to modify your css classes and styles right in the page so you can see the results immediately. I'll then update my Skin CSS classes to match the styles I created using the browser dev tool.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.