Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Add some Style to your DataGrids

, 5 Jul 2004 CPOL
Use CSS style sheets to apply re-usable styles across all of your grids.
H1
{
	font-size: medium;
	color: peru;
	font-family: Arial;
}

.Grid
{
	border: solid 1px Tan;
}

.Grid td
{
	border: solid 3px #FFFFFF;
	margin: 3px 3px 3px 3px;
	font-family: Arial;
	padding: 5px 5px 5px 5px;
	text-align: center;
}

.GridHeader
{
	font-weight: bold;
	background-color: Tan;
}

.GridHeader a
{
	text-decoration: none;
	color: LightGoldenrodYellow;
	padding: 0px 15px 0px 15px;
}

.GridHeader a:hover
{
	text-decoration: underline;
	background: Tan url(images/spin.gif) no-repeat 0 100%;
}

.GridItem, .GridAltItem
{
	font-size: smaller;
}

.GridItem
{
	background-color: LightGoldenrodYellow;
}

.GridAltItem
{
	background-color: PaleGoldenrod;
}

.GridPager
{
	font-size: small;
	background-color: LightGoldenrodYellow;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Steven Campbell
Web Developer
United States United States
Steve is a software developer working in Minneapolis, MN.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141220.1 | Last Updated 6 Jul 2004
Article Copyright 2004 by Steven Campbell
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid