如何在经典的Drupal 7主题中更改CSS颜色?

时间:2014-12-21 14:20:34

标签: css drupal-7 drupal-theming

我想在经典的免费Drupal 7主题中更改主菜单背景的颜色。它是橙色的,我想用另一种颜色(深蓝色或绿色)。这是Drupal repository for the themes

我找不到要更改的必要CSS代码块。我已经阅读了主题指南,配色方案和书籍,尚不清楚。橙色的颜色以ff...

开头

请告知如何操作。


这是CSS原始代码:

@font-face {
  font-family: 'BebasNeueRegular';
  src: url('fonts/BebasNeue-webfont.eot');
  src: url('fonts/BebasNeue-webfont.eot?#iefix') format('embedded-opentype'),
     url('fonts/BebasNeue-webfont.woff') format('woff'),
     url('fonts/BebasNeue-webfont.ttf') format('truetype'),
     url('fonts/BebasNeue-webfont.svg#BebasNeueRegular') format('svg');
  font-weight: normal;
  font-style: normal;

}

@font-face {
  font-family: 'YanoneKaffeesatzRegular';
  src: url('fonts/YanoneKaffeesatz-Regular-webfont.eot');
  src: url('fonts/YanoneKaffeesatz-Regular-webfont.eot?#iefix') format('embedded-opentype'),
     url('fonts/YanoneKaffeesatz-Regular-webfont.woff') format('woff'),
     url('fonts/YanoneKaffeesatz-Regular-webfont.ttf') format('truetype'),
     url('fonts/YanoneKaffeesatz-Regular-webfont.svg#YanoneKaffeesatzRegular') format('svg');
  font-weight: normal;
  font-style: normal;

}

/* Deafults */

/* Default Style
--------------------------------*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
  margin:0;
  padding:0;
  border:0;
  outline:0;
  font-size:100%;
  vertical-align:baseline;
  background:transparent;
}

article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section { 
  display:block;
}

nav ul {
  list-style:none;
}

blockquote, q {
  quotes:none;
    border: 1px solid #bbbbbb;
    background: rgb(241, 241, 241) url(images/quote.png) no-repeat;
    padding: 10px 5px 5px 47px;
    text-shadow: 1px 1px #fff;
    margin: 5px 0;
    border-radius: 7px;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content:'';
  content:none;
}

pre {
  background: #d8d8d8;
  text-shadow: 1px 1px #fff;
  border: 1px solid #bbbbbb;
  padding: 7px;
  margin: 5px 0;
  border-radius: 7px;
}

code {
  background: rgb(240, 240, 240);
  text-shadow: 1px 1px #fff;
  border: 1px solid #bbbbbb;
  display: block;
  padding: 7px;
  margin: 5px 0;
  border-radius: 7px;
}

ins {
  background-color:#fdfc9b;
  text-decoration:none;
}

mark {
  background-color:#fdfc9b;
  font-style:italic;
  font-weight:bold;
}

del {
  text-decoration: line-through;
}

abbr[title], dfn[title] {
  border-bottom:1px dotted;
  cursor:help;
}

hr {
  height:1px;
  background: #9f9f9f;
  margin: 7px 0;
  border: none;
    clear: both;
    float: none;
    width: 100%;
}

input, select {
  vertical-align:middle;
}

select {
  border-radius: 4px;
  border: 1px solid #ACACAC;
  padding: 3px 4px;
}

.clear {
  clear: both;
}

.clearfix:after {
  display: block;
  visibility: hidden;
  content: ".";
  clear: both;
  text-indent: -9999px;
  height: 0;
}
.remove-margin {
  margin-right: 0 !important;
}

fieldset {
  border: 1px solid #ccc;
  margin: 0 0 1.4615em;
  padding: 1.5385em;
}

table {
  border-collapse:collapse;
  border-spacing:0;
  margin-bottom: 15px;
  width: 100%;
}

th, tr, td {
  vertical-align: middle;
}

.sticky-header th, .sticky-table th {
  border-bottom: 3px solid #ccc;
  padding-right: 1em;
  text-align: left;
}

body {
    margin:0 auto;
    padding:0;
    font-family:Tahoma,Georgia,Arial,sans-serif;
    font-size:13px;
    background:url(images/body_bg.png) repeat-x center top #fff;
  line-height:1.5em;
}


a {
  text-decoration: none;
  color: #0593C7;
  -webkit-transition: color 0.2s ease-in-out;
  -moz-transition: color 0.2s ease-in-out;
  -o-transition: color 0.2s ease-in-out;
  -ms-transition: color 0.2s ease-in-out;
  transition: color 0.2s ease-in-out;
}

a:hover {
  text-decoration: none;
  color: #0579A4;
}

p {
  margin: 0 0 0.8em;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

h1,h2, h3, h4, h5, h6 {
    line-height:125%;
    font-weight: normal;
    }

h1 {
    font-size: 26px;
    }   

h2 {
    font-size: 21px;
    }
h3 {
    font-size: 19px;
    }
h4 {
    font-size: 17px;
    }
h5 {
    font-size: 15px;
    }
h6 {
    font-size: 13px;
    }

.clear {
    clear:both;
    }

  /* The Outer cover */

#wrapper {
    width:1000px;
    margin:0px auto;
}

#content-container{
    padding:0px;
    width:100%;
}

/* TOP */

#header-top{
    margin:0px auto;
    position:relative;
  height:100%;
}

.logo{
    float: left;
    width:300px;
}

.logo #logoimg {
  float:left;
  height: 55px;
  margin:0;
  padding:0 12px 0 0;
}

.logo #logoimg img{
  width: 100%;
  height: 100%;
}

.logo .sitename {
  float:left;
}

.logo .sitename h1{
    font-size:32px;
    font-family:BebasNeueRegular,Arial, serif;
    font-weight:normal;
  margin: 10px 0;
}

.logo .sitename h1 a:link, .logo .sitename h1 a:visited{
    color:#f25409;
}

.logo .sitename h1 a:hover{
    color:#666;
}

.logo .sitename h2 {
    color:#888;
    font-size: 10px;
  position: relative;
  top: -18px;
    font-weight:normal;
}

/* Social bookmarks */

.social-icons {
  float: right;
  margin-top: 10px;
}

.social-icons li {
  float: left;
  font-size: 11px;
  margin: 3px 5px;
  padding:0px;
  text-transform: uppercase;
  list-style: none;
}

/* PRIMARY NAVIGATION        */

#menu-container{
    height:55px;
    text-transform:uppercase;
    clear:both;
    border-top:1px solid #fff;
    border-bottom:1px solid #fff;
  padding: 0 0 0 10px;
  background:#fff;
    }

#main-menu {
  float: right;
    width:660px;
    margin: 0 auto 0;
  overflow: hidden;

    }

#main-menu ul {
    float: right;
    list-style: none;
    margin: 0;
    padding: 0;
    }

#main-menu li {
    float: left;
    list-style: none;
    margin: 0;
    padding: 0;
    line-height:40px;
    font-family:BebasNeueRegular,Arial, serif;  
    font-size:18px;
    }

#main-menu li a {
    color: #45565a;
    display: block;
  margin: 0;
    padding: 8px 20px;
    text-decoration: none;
    position: relative;
  border-right: 1px solid #E7EEF0;
    }
#main-menu li:last-child a{
  border:0;
}
#main-menu li a:hover, #main-menu li a:active, #main-menu .active-trail a, #main-menu li a.active {
  color: #fff;
    background: #fe5c11;
    }

#main-menu li a.sf-with-ul {
    padding-right: 10px;
    }   

#main-menu li a .sf-sub-indicator {
    display: block;
    width: 10px;
    height: 10px;
    text-indent: -9999px;
    overflow: hidden;
    position: absolute;
    top: 19px;
    right: 5px;
    }

#main-menu li li a, #main-menu li li a:link, #main-menu li li a:visited {
    background: #444;
    color: #ddd;
    width: 148px; 
    font-family: Arial, Tahoma, Verdana;
    margin: 0;
    padding: 3px 10px;
    line-height:30px;
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    text-transform: none;
    position: relative;
    font-size:12px; 
    }

#main-menu li li a:hover, #main-menu li li a:active {
    background: #4a4a4a;
    color: #fff;
    }

#main-menu li li a .sf-sub-indicator {

    top: 10px;
    }

#main-menu li ul {
    z-index: 9999;
    position: absolute;
    left: -999em;
    height: auto;
    width: 170px;
    margin: 1px 0px 0px 0px;
    padding: 0;
    }

#main-menu li ul a { 
    width: 150px;
    }

#main-menu li ul a:hover, #main-menu li ul a:active { 
    }

#main-menu li ul ul {
    margin: -31px 0 0 169px;
    }

#main-menu li:hover ul ul, #main-menu li:hover ul ul ul, #main-menu li.sfHover ul ul, #main-menu li.sfHover ul ul ul {
    left: -999em;
    }

#main-menu li:hover ul, #main-menu li li:hover ul, #main-menu li li li:hover ul, #main-menu li.sfHover ul, #main-menu li li.sfHover ul, #main-menu li li li.sfHover ul {
    left: auto;
    }

#main-menu li:hover, #main-menu li.sfHover { 
    position: static;
    }


/* HOME PAGE */

#slider{
    position:relative;
    width:900px;
    margin:50px auto 25px;
    padding-bottom:20px;
}

#front-welcome{
    text-align:center;
    padding:20px 0 0 0;
    font-family:"YanoneKaffeesatzRegular",arial;
  margin-bottom:-30px;
}

#front-welcome .block > h2{
    color:#282c2f;
    font-size:28px;
    margin:0px auto;
    font-family:"YanoneKaffeesatzRegular",arial;
    font-weight:normal;
  text-transform: none;
}

#front-welcome p{
    padding:10px 0px;
    color:#282c2f;
    line-height:22px;
    font-size:18px;
    font-family:"YanoneKaffeesatzRegular",arial;
}


/*------------------------------------------------*/

#page-container{
  float: left;
  margin: 0 auto;
  width: 95%;
  overflow: hidden;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.not-front #page-container{
  background: white;
  padding: 20px;
  border: 1px solid #DDD;
  width: 100%;
}

#content {
  display: inline;
  margin: 0;
}

/* 3 columns */

body.two-sidebars #content {
  float: left;
  margin: 0 0 0 25px;
  padding: 0;
  width: 495px;
}

/* 2 columns: sidebar-first */

body.sidebar-first #content {
  float: right;
  margin: 0;
  padding: 0;
  width: 725px;
}

/* 2 columns: sidebar-second */

body.sidebar-second #content {
  float: left;
  margin: 0;
  padding: 0;
  width: 675px;
}

body.two-sidebars #sidebar-first {
  float: left;
  margin: 0;
  padding: 0;
  width: 200px;
}

/* 3 columns: sidebar-second */

body.two-sidebars #sidebar-second {
  float: right;
  margin: 0;
  padding: 0;
  width: 200px;
}

/* 2 columns: sidebar-first */

body.sidebar-first #sidebar-first {
  float: left;
  margin: 0;
  padding: 0;
  width: 200px;
}

/* 2 columns: sidebar-second */

body.sidebar-second #sidebar-second {
  float: right;
  margin: 0;
  padding: 0;
  width: 200px;
  padding-left: 20px;
  min-height: 330px;
  -webkit-box-shadow: -2px 1px 2px #DDD;
  -moz-box-shadow: -2px 1px 2px #DDD;
  -o-box-shadow: -2px 1px 2px #DDD;
  box-shadow: -2px 1px 2px #DDD;
}

.node {
  margin-bottom: 20px;
  padding-bottom: 20px;
}

#preface-wrapper {
  margin: 0 auto;
}
#preface-wrapper .column {
  float: left;
}
#preface-wrapper.in1 .column {
  width: 100%;
}
#preface-wrapper.in2 .column {
  width: 50%;
}
#preface-wrapper.in3 .column {
  width: 33.3%;
}
#preface-wrapper .block {
  padding-left: 15px;
  padding-right: 15px;
}

#bottom-wrapper {
  margin: 10px auto 0;
  text-align: left;
  width: 930px;
}

#bottom-wrapper .column {
  float: left;
  padding-bottom: 15px;
}
#bottom-wrapper.in1 .column {
  width: 100%;
}
#bottom-wrapper.in2 .column {
  width: 50%;
}
#bottom-wrapper.in3 .column {
  width: 33.3%;
}
#bottom-wrapper.in4 .column {
  width: 25%;
}
#bottom-wrapper .block {
  padding-left: 15px;
  padding-right: 15px;
}

.bottom{
  clear: both;
    background:#f4f4f4;
    padding:10px 0px;
}
.bottom-container{
  margin: auto;
  width: 930px;
}

.bottom-container .column {
  float: left;
}
.bottom-container.in1 .column {
  width: 100%;
}
.bottom-container.in2 .column {
  width: 50%;
}
.bottom-container.in3 .column {
  width: 33.3%;
}
.bottom-container .block {
  padding-left: 15px;
  padding-right: 15px;
  margin-bottom: 0;
}

.bottom-container p{
    padding:5px 0px;
    color:#555;
    line-height:20px;
}

#footer{
  float: left;
    padding:10px 0px;
    overflow:auto;
    font-family:Arial;
    color:#777;
  background: #d9e0e3;
  border:1px solid #cfd7db;
  width: 100%;
}

#footer #block-system-powered-by{
  margin: 10px 0 0 0;
}

.footer_wrapper{
  width: 930px;
  margin: 0 auto;
  overflow: hidden;
}

.credit{
    float:right;
    margin:10px 0px;
}

.copyright{
    float:left;
    margin:10px 0px;
    width:400px;
}

.block > h2{
    font-family:BebasNeueRegular,Arial, serif;
    padding: 0px 0px 4px 0px;
    color:#555;
    font-size:24px;
    font-weight:normal;
    margin:5px 0px;
    text-transform:uppercase;
  border-bottom: 1px solid #ccc;
}

.sidebar .block{
    float:left;
    width:200px;
    font-size:12px;
    margin:0px 0px 30px 0px;
    display:inline;
    overflow:hidden;
}

.block{
    margin:0px 0px 30px 0px;
  overflow: hidden;
}

.node h2.title, #page-title{
  color: #555555;
  font-family: BebasNeueRegular,Arial,serif;
  font-size: 24px;
  font-weight: normal;
  padding: 0 0 10px;
}

.node h2.title a{
  color: #555555;
}

.content {
 color: #333333;
}


/* Slideshow */

#slideshow {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 20px 0 40px 0;
  float: left;
}

#slides {
  clear: both;
  position: relative;
  width: 900px;
  margin: auto;
}


.slides_container {
  width: 841px;
  height: 320px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  border: 5px solid white;
  margin: 0 auto;
  -webkit-box-shadow: 0px 0px 26px #999;
  -moz-box-shadow: 0px 0px 26px #999;
  -o-box-shadow: 0px 0px 26px #999;
  box-shadow: 0px 0px 26px #999;

}

.slides_container a,
.slides_container img {
  display: block;
  width:840px;
}


#slides .next,
#slides .prev{
  position: absolute;
top: 127px;
left: -21px;
width: 78px;
height: 83px;
margin: 0;
background: url(images/slider_arrow.png) -10px -23px;
z-index: 10;
}
#slides .prev{
  left: 833px;
  background: url(images/slider_arrow.png) -10px 119px;
}

.slides_nav {
  display: block !important;
}

#slides ul.pagination {
  border: 0;
  position: absolute;
  z-index: 10;
  margin: -25px 0 0 15px;
  bottom: 16px;
  right: 32px;
}

#slides ul.pagination li {
  float:left;
  margin: 0 10px 0 0;
  list-style:none;
}

#slides ul.pagination li a {
  display:block;
  width:12px;
  height:0;
  padding-top:12px;
  background: url(images/slides_arrows.png) 0 160px;
  float:left;
  overflow:hidden;
}

#slides ul.pagination li.current a {
  background: url(images/slides_arrows.png) 188px 160px;
}

.submitted {
  padding: 4px 9px 4px 0px;
  border-radius: 4px;
  color: #fe5c11;
  clear: both;
  display: block;
  font-size: 11px;
  margin-bottom: 2px;
  font-style: italic;
}

footer .links{
  font-size: 12px;
}

.links {
  color: #000;
  margin-top: 10px;
  font-size: 14px;
}

.links li a {
  background: #C0D8DD;
  display: inline-block;
  padding: 2px 5px;
  border-radius: 4px;
  color: #383838;
  font-weight: normal;
  margin-bottom: 2px;
}

.links li a:hover {
  color: #B81007;
}

.content ul, .content ol {
  padding-left:20px;
}

.content table {
  background: #ececec;
  border: 1px solid #bbbbbb;
}

.content th {
  background: #dbdbdb;
  padding: 5px 4px;
  text-shadow: 1px 1px #fff;
  border-right: 1px solid #c8c7c7;
}

.content td {
  background: #ebebeb;
  color: #747474;
  text-align: left;
  padding-left: 4px;
  border-right: 1px solid #c8c7c7;
  border-bottom: 1px solid #c8c7c7;
}

/*-------------------------------------------*
/* Fix CKEditor style
/*-------------------------------------------*/
#content-container table.cke_editor {
  background: transparent;
  border: 0;
}
#content-container table.cke_editor td {
  background: transparent;
  padding: 0;
  border: 0;
}

/*-------------------------------------------*
/* Poll, Buttons, Form
/*-------------------------------------------*/
.poll .vote-form .choices .title {
  font-size: 14px;
  font-weight: normal;
  line-height: 2;
}

.poll .vote-form .choices {
  margin: 0;
}

input.form-checkbox, input.form-radio {
  vertical-align: baseline;
}

.form-text {
  border-radius: 3px;
  border: 1px solid #acacac;
  padding: 4px 5px;
}

/*-------------------------------------------*
/* Menus and item lists 
/*-------------------------------------------*/
.item-list ul {
  margin: 0;
  padding: 0 0 0 1.5385em;
}

.item-list ul li {
  margin: 0;
  padding: 0;
}

ul.menu li {
  margin: 0;
  padding: 0;
}

ul.inline {
  clear: both;
}

ul.inline li {
  margin: 0;
  padding: 0;
}

/*-------------------------------------------*
/* Admin Tabs
/*-------------------------------------------*/
.tabs-wrapper {
  border-bottom: 1px solid #b7b7b7;
  margin: 0 0 5px 0;
}

ul.primary {
  border: none;
  margin: 0;
  padding: 0;
}

ul.primary li a {
  background: none;
  border: none;
  display: block;
  float: left;
  line-height: 1.5385em;
  margin: 0;
  padding: 0 1em;
  border-radius: 4px 4px 0 0;
  margin-right: 5px;
}

ul.primary li a:hover, ul.primary li a.active {
  background: #666;
  border: none;
  color: #fff;
}

ul.primary li a:hover {
  background: #888;
  text-decoration: none;
}

ul.secondary {
  background: #666;
  border-bottom: none;
  clear: both;
  margin: 0;
  padding: 0;
}

ul.secondary li {
  border-right: none;
}

ul.secondary li a, ul.secondary li a:link {
  border: none;
  color: #ccc;
  display: block;
  float: left;
  line-height: 1.5385em;
  padding: 0 1em;
}

ul.secondary li a:hover, ul.secondary li a.active {
  background: #888;
  color: #fff;
  text-decoration: none;
}

ul.secondary a.active {
  border-bottom: none;
}

/*-------------------------------------------*
/* Tabs and Tags
/*-------------------------------------------*/
.field-name-field-tags {
  margin: 0 0 10px 0;
}

.field-name-field-tags a{
  display: inline-block;
  background: rgb(235, 235, 235);
  padding: 1px 5px;
  height: 22px;
  color: #333;
  text-shadow: 1px 1px #fff;
  border-radius: 2px;
  font-size: 12px;
}

.field-name-field-tags a:hover{
  color: #205194;
}

.field-name-field-tags .field-item {
  margin: 0 1em 0 0;
}

.field-name-field-tags div {
  display: inline;
}

#content-container .field-label{
}

#content-container .field-items .field-item{
}

/*-------------------------------------------*
/* Profile
/*-------------------------------------------*/
.profile {
  margin: 1.5385em 0;
}

.profile dd {
  margin-bottom: 1.5385em;
}

.profile h3 {
  border: none;
}

.profile dt {
  margin-bottom: 0;
}

.password-parent {
  width: 36em;
}

/*-------------------------------------------*
/* comment
/*-------------------------------------------*/
#comments {
clear: both;
margin-top: 14px;
padding: 10px;
border: 1px solid #dddddd;
border-radius: 8px;
background: rgb(253, 253, 253);
}

.comment {
  margin-bottom: 1.5em;
  padding: 5px;
  border-radius: 7px;
  min-height: 150px;
  border-bottom: 1px solid #d9d9d9;
}

h3.comment-title a{
  margin-bottom: 5px;
  font-size: 16px;
  color: #67696d;
}

.comment .new {
  color: red;
  text-transform: capitalize;
  margin-left: 1em;
}

.form-textarea-wrapper textarea {
  border-radius: 3px;
  border: 1px solid #acacac;
}

.comment .submitted {
  display:inline;
  background: #e5e5e5;
}

.comment .user-picture{
  float: left;
  padding: 4px;
  border: 1px solid #d9d9d9;
  margin-right: 7px;
  margin-bottom: 7px;
}

.comment-new-comments{
  display: none;
}

/*-------------------------------------------*
/* Navigation
/*-------------------------------------------*/
.item-list .pager {
}

.item-list .pager li {
  background: #cfcfcf;
  border-radius: 3px;
  margin-right: 4px;
  text-shadow: 1px 1px #fff;
}

/*-------------------------------------------*
/* Forum
/*-------------------------------------------*/
.field-name-taxonomy-forums div {
  display: inline;
  margin-top: 4px;
}

.field-name-taxonomy-forums .field-items {
}

#forum .title {
  font-size: 16px;
}

#forum .submitted {
  font-size: 12px;
  font-family: Lucida Grande, Verdana, Arial, sans-serif;
  background: transparent;
  padding: 0;
}

#forum .container {
  background: #a1a1a1;
  color: #fff;
}
.....end...

1 个答案:

答案 0 :(得分:0)

在/sites/all/classic-theme/style.css

中更改第371行
background: #fe5c11;

你想要的任何颜色。