The next thing I want to go over is the stylesheet code that I used to make this work. I will tie all of it together later, but I wanted to go over this part next. I actaully created 5 to 6 stylesheets that have mostly the same code except for elements that affect size and position as some of these will be different. In the end, I will show how I used javascript to select the stylesheet to use.
Here is the code:
- body
- {
- margin: 0;
- padding: 0;
- background: #F7F7F7 url(images/img01.jpg) repeat-x left top;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 12px;
- color: #787878;
- }
- h1, h2, h3
- {
- margin: 0;
- padding: 0;
- font-weight: normal;
- color: #000000;
- }
- h1
- {
- font-size: 2em;
- }
- h2
- {
- font-size: 2.4em;
- }
- h3
- {
- font-size: 1.6em;
- }
- p, ul, ol
- {
- margin-top: 0;
- line-height: 180%;
- }
- ul, ol
- {
- }
- a
- {
- text-decoration: none;
- color: #BC1B32;
- }
- a:hover
- {
- }
- #wrapper
- {
- width: 1550px;
- margin: 0 auto;
- padding: 0;
- }
- /* Header */
- #header
- {
- width: 1530px;
- height: 102px;
- margin: 0 auto;
- }
- /* Logo */
- #logo {
- float: left;
- margin: 0;
- padding-top: 30px;
- color: #000000;
- }
- #logo h1, #logo p {
- margin: 0;
- padding: 0;
- }
- #logo h1 {
- float: left;
- letter-spacing: -1px;
- text-transform: uppercase;
- font-size: 3.8em;
- }
- #logo p {
- float: left;
- margin: 0;
- padding: 26px 0 0 10px;
- font: normal 14px Georgia, "Times New Roman", Times, serif;
- font-style: italic;
- }
- #logo a {
- border: none;
- background: none;
- text-decoration: none;
- color: #000000;
- }
- /* Search */
- #search
- {
- position: absolute;
- top: 0px;
- right: 0px;
- width: 280px;
- height: 28px;
- background: #E2E2E2;
- z-index: 10000;
- }
- #search form
- {
- height: 25px;
- margin: 0;
- }
- #search fieldset
- {
- margin: 0;
- padding: 0;
- border: none;
- }
- #search-text
- {
- width: 250px;
- border: 1px solid #DEDEDE;
- background: #FFFFFF;
- text-transform: lowercase;
- font: normal 11px Arial, Helvetica, sans-serif;
- color: #5D781D;
- }
- #search-submit
- {
- width: 50px;
- height: 22px;
- border: none;
- background: #B9B9B9;
- color: #000000;
- }
- /* Page */
- #page
- {
- width: 1530px;
- margin: 0 auto;
- padding: 0;
- }
- #page-bgtop
- {
- padding: 20px px;
- }
- #page-bgbtm
- {
- }
- /* Content */
- #content
- {
- position: relative;
- float: left;
- width: 1248px;
- padding: 0;
- z-index: 0;
- }
- /* Sidebar */
- #sidebar
- {
- position:relative;
- float: right;
- width: 280px;
- padding: 0px;
- color: #787878;
- background: #FFFFFF;
- z-index: 0;
- }
- #sidebar ul
- {
- margin: 0;
- padding: 0;
- list-style: none;
- }
- #sidebar li
- {
- margin: 0;
- padding: 0;
- border-left: 1px solid #E2E2E2;
- }
- #sidebar li ul
- {
- margin: 0px 0px;
- padding-bottom: 30px;
- }
- #sidebar li li
- {
- line-height: 35px;
- border-bottom: 1px dashed #D1D1D1;
- margin: 0px 30px;
- border-left: none;
- }
- #sidebar li li span
- {
- display: block;
- margin-top: -20px;
- padding: 0;
- font-size: 11px;
- font-style: italic;
- }
- #sidebar h2
- {
- height: 38px;
- padding-left: 30px;
- letter-spacing: -.5px;
- font-size: 1.8em;
- color: #000000;
- }
- #sidebar p
- {
- margin: 0 0px;
- padding: 0px 30px 20px 30px;
- text-align: justify;
- }
- #sidebar a
- {
- border: none;
- color: #BC1B32;
- }
- #sidebar a:hover
- {
- text-decoration: underline;
- color: #8A8A8A;
- }
- /* Calendar */
- #calendar
- {
- }
- #calendar_wrap
- {
- padding: 20px;
- }
- #calendar table
- {
- width: 100%;
- }
- #calendar tbody td
- {
- text-align: center;
- }
- #calendar #next
- {
- text-align: right;
- }
- /* Footer */
- #footer
- {
- position: absolute;
- width: 100%;
- height: 15px;
- margin: 0 auto;
- background: #ECECEC;
- border-top: 1px solid #DEDEDE;
- font-family: Arial, Helvetica, sans-serif;
- bottom: 0px;
- }
- #footer p
- {
- margin: 0;
- line-height: normal;
- font-size: 10px;
- text-transform: uppercase;
- text-align: center;
- color: #A0A0A0;
- }
- #footer a
- {
- color: #8A8A8A;
- }
- .fixedheader
- {
- position: relative;
- top: expression(this.offsetParent.scrollTop);
- }
- #welcome
- {
- display: none;
- }
- /* Menu */
- .menu
- {
- position: relative;
- width: 1530px;
- height: 36px;
- margin: 0 auto;
- padding: 0;
- background: #000000;
- z-index: 10000 !important;
- }
- .menu ul li a, .menu ul li a:visited
- {
- display: block;
- width: 156px;
- height: 28px;
- background: #000000;
- padding-top: 8px;
- border-right: 1px solid #FFFFFF;
- text-transform: uppercase;
- text-decoration: none;
- text-align: center;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 13px;
- font-weight: bold;
- color: #FFFFFF;
- border: none;
- }
- .menu ul
- {
- padding: 0;
- margin: 0;
- list-style: none;
- }
- .menu ul li
- {
- float: left;
- position: relative;
- }
- .menu ul li ul
- {
- display: none;
- }
- .menu ul li:hover a {color:#fff; background:#BC1B32;}
- .menu ul li:hover ul {display:block; position:absolute; top:36px; left:0; width:156px;}
- .menu ul li:hover ul li a.hide {background:#BC1B32; color:#fff;}
- .menu ul li:hover ul li:hover a.hide {background:#BC1B32; color:#fff;}
- .menu ul li:hover ul li ul {display:none;}
- .menu ul li:hover ul li a {display:block; background:#000; color:#fff;}
- .menu ul li:hover ul li a:hover {background:#BC1B32; color:#fff;}
- .menu ul li:hover ul li:hover ul {display:block; position:absolute; left:156px; top:0;}
- .menu ul li:hover ul li:hover ul.left {left:-156px;}
- #sidemenu
- {
- position:relative;
- float: right;
- width: 280px;
- padding: 0px;
- color: #787878;
- background: #FFFFFF;
- z-index: 0;
- }
- .sidebarbutton
- {
- float: right;
- height: 28px;
- width: 278px;
- border: 1px solid black;
- cursor: pointer;
- text-align: center;
- vertical-align: middle;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 13px;
- font-weight: bold;
- text-transform: uppercase;
- color: #000;
- background: #EEEEEE;
- }
- .sidebarcontent
- {
- float: right;
- width: 278px;
- border-left: 1px solid black;
- border-right: 1px solid black;
- border-bottom: 1px solid black;
- background: #E2E2E2;
- color: #000;
- }
- #sidebarcontent ul li a, #sidebarcontent ul li a:visited
- {
- text-decoration: underline;
- color: #000;
- }
- #sidebarcontent ul li a:hover
- {
- font-weight:bold !important;
- }
- #sidebarcontent td
- {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 9px;
- text-transform: uppercase;
- color: #000;
- }
- #sidebarcontent td a, #sidebarcontent td a:visited
- {
- text-decoration: underline;
- color: #000;
- }
- #sidebarcontent td a:hover
- {
- font-weight:bold !important;
- }
- /*--------------------------- THEME OVERRIDES ------------------------------------------------------*/
- .ms-MenuUIPopupBody TABLE
- {
- color:#ffffff;
- }
- .ms-MenuUI,.ms-MenuUILarge,.ms-MenuUIRtL,.ms-MenuUILargeRtL
- {
- background-color:#000000 !important;
- }
- .ms-MenuUI
- {
- background-image:url("images/MGrad_plastic.gif");
- }
- .ms-MenuUILarge
- {
- background-image:url("images/MGradLarge_plastic.gif");
- }
- .ms-MenuUIRtL
- {
- background-image:url("images/MGradRtl_plastic.gif");
- }
- .ms-MenuUILargeRtL
- {
- background-image:url("images/MGradLargeRtl_plastic.gif");
- }
- .ms-MenuUIItemTableCell,.ms-MenuUIItemTableCellCompact
- {
- color:#ffffff;
- }
- .ms-MenuUIItemTableCell A,.ms-MenuUIItemTableCellHover A,.ms-MenuUIItemTableCellCompact A,.ms-MenuUIItemTableCellCompactHover A
- {
- color:#ffffff;
- }
- .ms-menuitemdescription
- {
- color:#ffffff;
- }
- .ms-MenuUIItemTableCellHover,.ms-MenuUIItemTableCellCompactHover
- {
- color:#ffffff;
- }
- .ms-MenuUIItemTableHover
- {
- background-color:#BC1B32;
- border:1px solid #ff0000;
- }
- .ms-MenuUIItemTableHover .ms-menuitemdescription
- {
- color:#ffffff;
- }
- .ms-MenuUIItemTableCellDisabled
- {
- color:#ffa06d;
- }
- .ms-toolbar,.ms-viewtoolbar,.ms-formtoolbar,.ms-toolbarContainer{
- color:#ffffff;
- }
- .ms-toolbar-togglebutton-on{
- border:1px solid #000000;
- }
- table.ms-toolbar,table.ms-viewtoolbar,.ms-toolbarContainer{
- background-image:url("toolgrad_plastic.gif");
- background-color:#E2E2E2;
- }
- table.ms-toolbar,.ms-toolbarContainer{
- border:1px solid #000000;
- }
- .ms-listheader{
- color:#ffffff;
- background-image:url("listheadergrad_plastic.gif");
- }
- .ms-menutoolbar{
- border-bottom:1px solid #000000;
- height:22px;
- background-color:#E2E2E2;
- background-image:url("listheadergrad_plastic.gif");
- background-repeat:repeat-x;
- }
- .ms-menutoolbar td{
- border-top:solid 1px #000000;
- border-bottom:solid 1px #000000;
- }
- .ms-menutoolbar td a{
- color:#000000;
- }
- .ms-menutoolbar td a:hover{
- color:#000000;
- font-weight:bold;
- }
- .ms-menubuttonactivehover,.ms-buttonactivehover
- {
- background: #BC1B32;
- border:none !important;
- }
- td.ms-menutoolbarheader{
- color:#000000;
- }
- .ms-listheaderlabel{
- color:#000000;
- }
- .ms-menutoolbar td td.ms-viewselector,.ms-menutoolbar td td.ms-viewselectorhover,.ms-toolbar td td.ms-viewselector,.ms-toolbar td td.ms-viewselectorhover,.ms-authoringcontrols td td.ms-viewselector,.ms-authoringcontrols td td.ms-viewselectorhover,td.ms-viewselector{
- border:solid 1px #000000;
- background:#a2a2a2 !important;
- }
- div.ms-viewselector,div.ms-viewselectorhover{
- border:solid 1px #000000;
- }
- div.ms-viewselector a{
- color:#000000;
- }
- .ms-menutoolbar td td.ms-viewselectorhover,.ms-toolbar td td.ms-viewselectorhover,.ms-authoringcontrols td td.ms-viewselectorhover{
- background:#000000;
- }
- .ms-rtetablecells{
- border:solid 1px #000000;
- }
- TD.ms-rtetoolbarsel{
- border:solid 1px #000000;
- }
- TD.ms-rtetoolbarhov
- {
- border:solid 1px #000000;
- background:#a2a2a2;
- color:#000000;
- }
- .ms-splitbuttonhover{
- border: none !important;
- background: #BC1B32;
- height: 22px;
- }
- .ms-splitbuttonhover .ms-splitbuttondropdown,.ms-splitbuttonhover .ms-splitbuttontext{
- border: none !important;
- background: #BC1B32;
- height: 22px;
- }
So, there it is. The first 395 lines are for the customized divs and items. After this I decided to include a few items from the standard themes to override. I am trying to maintain as much as possible a consistent look/feel. There are some things that I have not yet changed, but may get to eventually.
As this is a lot to digest, in my next post on this, I will go over the javascript code that gets most of the work done to make this work. Please let me know if you have questions, comments, or concerns!
No comments:
Post a Comment