标题,菜单和页脚都被切断了?

时间:2013-02-18 03:47:16

标签: php html css wordpress

好的,我有一个在WordPress上制作的网站,并编辑了CSS批次。 该网站看起来不错,但当您缩小浏览器时,页面会被切断。 这不是一个响应式网站,问题不在于滚动条出现,你需要滚动查看更多,问题是页眉,页脚和菜单被剪裁。

一些css代码是

/*
    Theme Name: thememagic
    Theme URI: http://themeszen.com/thememagic
    Description: A very neat and clean black and white business theme. The theme supports widgets. And features 
    theme-options, threaded-comments and multi-level dropdown menu. A simple and neat typography. This theme is the free version of our pro theme.
    Version: 1.4.10
    Author: Manish Gori
    Author URI: http://themeszen.com
    Tags: black,two-columns,theme-options
    License: GNU General Public License v2.0
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    */

@import "css/reset.css";

    /* general */
    /*////////////////////////////////////////////////////////////////////////////////////////////*/



a.special {
    font-color: #FFFFFF;
    outline: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
}

a.special:link {
    color: #FFFFFF;
    outline: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
}

a.special:visited {
    color: #FFFFFF;
}

a.special:active,
    a.special:hover {
    color: #E6E6E6;
    outline: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
}

body {
    background-color: #ffffff;
    font-family: 'Raleway', sans-serif;
    color: #333333;
    3
        line-height: 1.5em;
}

a {
    color: #464646;
    outline: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 17px;
}

a:link {
    color: #464646;
}

a:visited {
    color: #464646;
}

a:active,
    a:hover {
    color: #000;
    text-decoration: none;
}

h2.name {
    font-size: 12px;
    font-family: 'Raleway', sans-serif;
    padding-bottom: 15px;
}

h2.quote {
    font-size: 20px;
    font-family: 'Bad Script', cursive;
    text-shadow: 4px 4px 4px #aaa;
}

h1,h2,h3,h4,h5 {
    margin-bottom: 6px;
    padding: 0px;
    color: #1b1b1b;
    font-family: 'Margarine', cursive;
}

h2.shadow {
    font-size: 24px;
    font-family: 'Margarine', cursive;
    text-shadow: 4px 4px 4px #aaa;
    padding-bottom: 15px;
}

h1 {
    font-size: 30px;
    font-family: 'Margarine', cursive;
    text-shadow: 4px 4px 4px #aaa;
    padding-bottom: 15px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 24px;
    font-family: 'Raleway', sans-serif;
    font-size;
}

h5 {
    font-size: 17px;
    font-family: 'Raleway', sans-serif;
    font-size;
}

h6 {
    font-size: 13px;
    font-family: 'Raleway', sans-serif;
    color: #ffffff;
}

hr {
    background-color: #FFFFFF;
    border: 0;
    height: 1px;
    margin-bottom: 18px;
    clear: both;
}

p {
    padding: 0 0 0.5em;
    line-height: 1.6em;
}

ul {
    list-style: square;
    margin: 0 0 18px 0;
}

header.php代码是:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>


    <head profile="http://gmpg.org/xfn/11">
        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

               <title>  

        <?php 

                 wp_title( '|' );

    // Add the blog description for the home/front page.
    $site_description = get_bloginfo( 'description', 'display' );
    if ( $site_description && ( is_home() || is_front_page() ) )
        echo " | $site_description"; ?>

        </title>


<link href='http://fonts.googleapis.com/css?family=Bad+Script' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Margarine' rel='stylesheet' type='text/css'>
        <link href='http://fonts.googleapis.com/css?family=McLaren|Raleway:500' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_stylesheet_uri(); ?>" />

<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />


    <?php wp_head(); ?>

</head>

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

    <!--wrapper-->
    <div id="wrapper">

    <!--headercontainer-->
    <div id="header_container">

        <!--header-->
        <div id="header">

            <?php if ( ( of_get_option('logo_image') ) != '' ) { ?>
        <div id="logo"><a href="<?php echo home_url(); ?>" title="<?php bloginfo('description'); ?>"><img src="<?php echo of_get_option('logo_image'); ?>" alt="<?php echo of_get_option('footer_cr'); ?>" /></a></div><!--logo end-->
    <?php } else { ?>
            <div id="logo2"><a href="<?php echo home_url(); ?>" title="<?php bloginfo('description'); ?>"><?php bloginfo( 'name' ); ?></a></div><!--logo end-->
    <?php } ?>




            </div><!-- header end-->
            <div class="clear"></div>
        </div><!--header container end-->       

    <div class="clear"></div>

        <!--menu-->
    <div id="menu_container">

        <div id="menubar">

        <?php $navcheck = '' ; ?>

    <?php $navcheck = wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' , 'menu_class' => 'nav', 'fallback_cb' => '', 'echo' => false ) ); ?>

 <?php  if ($navcheck == '') { ?>

    <ul class="nav">
        <li class="page_item"><a href="<?php echo home_url(); ?>" title="Home"><?php _e( 'Home', 'thememagic' ); ?></a></li>                
        <?php wp_list_pages('title_li=&sort_column=menu_order'); ?>

    </ul>
<?php } else echo($navcheck); ?>  

    </div>  
    <div class="clear"></div>
</div><!--menu container end--> 
    <!--menu end-->

该网站为http://www.shoalhavenspecialas.com/ 如果有人可以帮助我,我正在努力解决这个问题,并且需要在几个小时内完成。 谢谢你所有的时间! :) 我希望你永远不会遇到无法解决的问题

1 个答案:

答案 0 :(得分:0)

要调整标题尺寸,您需要在容器宽度(964px)内的CSS中设置#logo <img/>的宽度。

#logo img {
    width: 964px;
    height: auto;
}

要将所有内容放入框中,约束到您喜欢的宽度,请进行以下更改:

header.php:在<body>打开后:

<div id="wrapperbox">

footer.php:就在</body>关闭之前:

</div>

的style.css:

#wrapperbox {
    width: 964px;
    margin: 0px auto;
    text-align: left;
}

body {
    text-align: center;
}