对style.css的更改未显示

时间:2014-08-07 20:20:58

标签: php css stylesheet

我的网站pretendcity.org有一个由其他人创建的自定义主题。要编辑内容,我使用Dreamweaver进入服务器打开单个文件(例如:如果我需要在标题中添加内容,我将编辑header.php)。

我的问题是,当我编辑/更新网站的style.css文件时,它不会立即更新。例如,我将背景颜色从#353535更改为#000000,并且没有任何更改。因此,我将style.css中的背景颜色保留为#000000数周,并且未在网站上找到任何更改。然后今天,WordPress自动更新到3.9.2,我发现背景颜色突然变为#000000。

现在我正在尝试将其更改回#353535并且不会进行任何更改。

以下是该网站的style.css:

@charset "UTF-8";
/*
Theme Name: Pretend City Children's Museum
Theme URI: http://pretendcity.org
Description: Pretend City v2
Author: Slava Popov
Author URI: http://laydbak.com
*/

/* =================
0081cd - Blue
83bc34 - Green
353535 - Text
cbcbcb - Borders
==================*/

/* =========== */
/* Page Styles */
/* =========== */

body {
    background: #f0f0f0;
    color: #353535;
    font: 12px Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    width: 100%;
    }
img {border: 0;}
table {margin: 0 0 10px 0; padding: 0; line-height: 19px; vertical-align: top !important; border-spacing:0; border-collapse:collapse;}
td {vertical-align: top !important;}
p {line-height: 19px; padding-bottom: 10px;}
h2, h3, h4, h5, h6 {color: #353535; margin-bottom: 10px;}
h1 {color: #0081cd; font-size: 24px; margin: 0 0 10px 0;}
h2 {color: #353535; font-size: 18px;}
h3 {color: #83bc34; font-size: 16px;}
h3 a {color: #83bc34;}
h4 {font-size: 14px;}
h5 {font-size: 14px;}
h6 {color: red; font-size: 11px;}
hr {
    border: none 0;
    border-top: 1px dashed #ccc;
    height: 1px;
    margin: 20px 0;
    width: 100%;
    }
a {color: #0081cd; text-decoration: underline;}
a:hover {text-decoration: none;}
ul {
    line-height: 19px;
    list-style-type: disc;
    padding: 0 0 20px 20px;}
.wrap {
    background: #FFF;
    border-left: #cbcbcb 1px solid;
    border-bottom: #cbcbcb 1px solid;
    border-right: #cbcbcb 1px solid;
    margin: 0 auto;
    position: relative;
    width: 958px;
    }

这是header.php代码:

<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>"/>
<meta property="twitter:pretendcity" content="42741399" />
<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<link rel="shortcut icon" href="<?php bloginfo( 'template_directory' ); ?>/favicon.ico" />
<link href="<?php bloginfo( 'template_directory' ); ?>/reset.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo get_stylesheet_uri(); ?>" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="<?php bloginfo( 'template_directory' ); ?>/shortcode.css" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="<?php bloginfo( 'template_directory' ); ?>/print.css" rel="stylesheet" type="text/css" media="print" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="<?php bloginfo( 'template_directory' ); ?>/all-ie-only.css" /><![endif]-->
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>

<!-- BEGIN GOOGLE ANALYTICS -->
 <script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-38311913-1', 'pretendcity.org');
  ga('send', 'pageview');

</script>
<!-- END GOOGLE ANALYTICS -->
</head>

<!--[if IE 7]>  <body class="lt-ie8">   <![endif]-->

<body <?php body_class(); ?>>

<!-- Top Info Bar -->
<div id="infobar">
    <div>
        <span><strong>Address:</strong> 29 Hubble, Irvine, CA 92618 (<a href="https://www.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Pretend+City+Children's+Museum,+29+Hubble,+Irvine,+CA&amp;aq=0&amp;oq=Pretend&amp;sll=33.835232,-117.8461&amp;sspn=0.246678,0.528374&amp;vpsrc=0&amp;ie=UTF8&amp;hq=Pretend+City+Children's+Museum,+29+Hubble,+Irvine,+CA&amp;t=m&amp;z=15&amp;iwloc=A&amp;cid=12592966360647214510" target="_blank" class="map">Get Directions</a>)</span>
        <span><strong>Phone:</strong> 949.428.3900</span>
        <span><strong>Hours:</strong> Tues. - Sun.. 10a.m. - 5p.m.</span>
        <span>Monday 10a.m. - 1p.m.</span>
        <strong>Ages:</strong> Infants to 8 years old
    </div>
</div>
<!-- Header & Logo -->
<header>


    <a href="/">
        <div class="logo" title="Pretend City Children's Museum"></div>
    </a>

    <!-- <a href="https://tickets.pretendcity.org/public/loader.asp?target=donation.asp?code=0013" target="_blank"> -->
    <a href="https://16116.blackbaudhosting.com/16116/General-Contributions" target="_blank">
        <div class="donate" title="Donate Today!"></div>
    </a>
<!-- Paypal Donate Button -->
      <div class="paypalicon" style="margin-top:55px; margin-left: 600px"><form title="Donate Today!" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"><input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="228Z5CXX3WVT8" />
<input type="image" alt="PayPal - The safer, easier way to pay online!" name="submit" src="http://pretendcity.org/images_home/donate-with-paypal-button-54.png" />
<img alt="" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" border="0" /></form></div>



</header>
<!-- Main Body Wrapper -->
<div class="wrap">
    <!-- Navigation Start -->
    <nav id="menu">
        <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container_class' => 'main-navigation', 'menu_class' => 'nav-menu' ) ); ?>
    </nav>

2 个答案:

答案 0 :(得分:1)

尝试更改css文件,然后打开此站点并打开链接样式表,然后检查样式表中是否存在这些更改。如果你看到那里的变化,那么使用开发工具来找出这些变化的错误,也许某些样式会覆盖你的样式。还可以从评论中尝试ctrl + f5解决方案。

答案 1 :(得分:0)

CSS文件可以在浏览器中兑现。尝试使用CTRL + F5(IE,FF或Chrome)刷新页面