Best way to override default css in SharePoinrt 2010 - css

I would like all my custom webpart and default webparts to look the same.
And i know css classes likeL:
ms-vh and ms-vb are used for the fonts,anchors and cell bacgrounds.
What would be the best way to override this to have my webparts have one look.
And also would like to have one font for everything.
Thanks in advance

You can add your own css file to your site template and define styles there.
This MSDN article might help you if you are interested in SharePoint branding.

Related

Embed other code to Wordpress whitout using theme css files

I have a wordpress theme, and it looks good now, however, I want to add a custom html form to it. But when I put the code in it whith path to its own css and js. The form looks terrible because of the css from the theme.
Is there any plugin or option to fix this or do I need to do it by an other way?
I looked everywhere on the internet but couldt find any solution.
Any help is welcome.
Thanks alot.
CSS means cascading stylesheets, and that's because the CSS from the page cascades downwards onto all the elements on the page. You either have to manually reset the CSS before it hits your form, or you need to embed your form as an iframe to avoid the cascade.
Theme and bootstrap css will override input fields with ton's of styles. You don't have much options but to find and "ran over" problematic styles with your own.
Use !important only if needed.

Subclassing or exentending djangcms plugin

I use the cascade bootstrap plugin and like it very much. Now i need to add additional classes to the rows and columnes for styling it more precisely via css. I would like to add style or id -fields to the cascade plugin. I thought the simpliest way is subclassing the cascade plugin but I cant find any way for doing this and I dont find the right place in the docs. Maybe you can give me a hint or point me in the right direction.This is my first djangocms project, I moved from zope.
Any tip or help is appreciated!
Regards,
Klaus
The CSS files that need to be overwritten are in static/css for whatever framework (Bootstrap/Grid System 960) that you want to use. I suggest creating a custom file and including it after the vendor CSS files, leaving them as-is, and have yours overwrite theirs.
See their documentation. In case the link changes: http://djangocms-cascade.readthedocs.org/en/latest/tutorial-bs3.html
They maintain Bootstrap's typical classes for structures, you could probably include a theme from Bootswatch

Is it possible to use 'variables' for css / html element?

i would like to make 'skinnable' a web site written in asp.net...
I explain: for example, i have a 'div' element, and i would like to define a background-color using a variable, not a fixed value.
How can i do ?
Css ? Or other tecniques ?
Thanks
CSS is exactly what your are looking for.
Keep in mind that when writing your classes and ids you should refer to the element semantically. It means you should NOT choose your names depending on the visual representation of the element.
Wrongs:
.blue
boxOnLeft
Goods:
.comments
related
To be able to skin your page, you'll just need to change your css.
Almost all is possible using CSS.
ASP.NET has built-in functionality for Themeing and Skinning:
ASP.NET Themes and Skins - MSDN
You could always roll your own as well. The general idea is that you have a seperate set of CSS for each Theme/Skin and then generate the references dynamically based on what Theme/Skin the user selects.
You might look at .Less and t4 template package for it:
http://haacked.com/archive/2009/12/02/t4-template-for-less-css.aspx
A lot of good notes in the comments of that link as well, including a visual studio addin.
CSS doesn't have programming variable capabilities that you hope to achieve.
However, there is a way to do this with PHP (I know you're looking for .NET solution here, but bear with me)
Basically, you add a line of header text "", save the css with .php extension, and then load the .php in html as css (""). Then you can manipulate variables with PHP.
I don't know anything about .NET, but I believe it should be possible in a similar manner.

Which is better in asp.net 2.0?

Can anyone tell me themes are better or CSS style sheets are better in asp.net for design?
Please explain the concept also with an example.
A theme can specify both .skin files and .css files. So there no reason not to use themes.
As for skins versus css: Go for css if its css'able.
You should combine them. Use your css files in the theme folder for your normal styling of all the html elements in your website (include all the generated elements).
In the skin file of a control, you can set the default css class. Other properties like the layout and default behaviour of the elements (sample: calender control) are editable here too.
Skin files are good for all layout specific configuration you can't easily do with css, but with the .net properties of the controls.
Basically themes is built for server controls. You can not use themes with html controls.
The css is used for server controls,html controls and tags. If you are using only server controls then you can use "theme" because you can enable or disable theme on control basis, page basis and whole website basis.
In my opinion CSS is best way to design website. because after rendering theme it shows the css style with controls and tags.
You can also use "Theme" and "CSS" together.
Same query is avilable at my post at following link.
ASP.NET 2.0, AppTheme: How can we utilize AppTheme in best way for my ASP.NET WEBSITE
It make you happy

How should I organize my ASP.Net themes and common CSS files

I am currently working on a project where a programmer who fancied themselves a graphic designer attempted their hand at ASP.Net themes. The CSS is pretty bad, but that is another question altogether.
What I really need help with is the best way to organize ASP.Net Themes and the CSS that lies within them. Imagine that there is a directory structure that looks something like this:
Themes
Theme A
StyleA.css
Common.css
Theme B
StyleB.css
Common.css
Theme C
StyleC.css
Common.css
Each theme has a common stylesheet in it. Unfortunately the author of those style sheets managed to change only a few things here and there in each copy of Common.css. Eventually I will evaluate whether or not those changes are even necessary, but some major cleanup needs to happen first. For now just assume that the changes, ever so small, are necessary for things to look right with each theme.
I would like to know what the best practices are for using themes while also needing some common styles across your application. I want to minimize the number of AppTurns in the page load, but I really want to consolidate common styles into one place in a way that maintains the ease of themes.
You should just include the standard/common css in the website and include it in the head of the masterpage instead of placing it in themes.
I have written a small article about that:
http://www.sambeauvois.be/blog/2010/01/dont-repeat-your-common-css-between-your-different-themes/
I'll complete it with more information later
Yes, just reference the common CSS file directly instead of putting it in the theme folders.
But what if you have a webpage in a sub folder that uses the masterpage? Won't the page to the css file be wrong then?

Resources