0
請看下面我的圖片,#myshop div max-width是1200px,當我使用一臺非常屏幕的電腦時,它看起來如下。我該如何解決這個問題,我唯一不能改變的地方是我無法改變#myshop的最大寬度,所以我怎樣才能讓它在大屏幕電腦上看起來很好。在小型電腦中,筆記本電腦可以。 Apprciate。 在大屏幕電腦上全屏顯示,寬度超過最大寬度,發生灰色背景
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" <?php language_attributes(); ?>> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html <?php language_attributes(); ?>> <!--<![endif]-->
<head>
\t <meta charset="<?php bloginfo('charset'); ?>">
\t <meta http-equiv="X-UA-Compatible" content="IE=edge" />
\t
\t <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
\t
\t <title><?php wp_title('|', true, 'right'); ?></title>
\t
\t <?php wp_head(); ?>
\t
\t
\t <!--[if lt IE 9]><script src="<?php echo THEMEASSETS; ?>js/ie8-responsive-file-warning.js"></script><![endif]-->
\t <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
\t
\t <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
\t <!--[if lt IE 9]>
\t <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
\t <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
\t <![endif]-->
\t <div id="top_head">
\t \t <a href="http://sayhitoworld.spreadshirt.com/shop/help/index/" id="top_help">Help?</a>
\t \t <div id="checkout_top" class="spreadplugin-checkout"><a target="_self">Shopping bag</a>(<span></span>)</div>
<a id="track_order" href="https://sayhitoworld.spreadshirt.com/shop/logon">Track Order</a>
</div><!--top_head-->
\t
\t
</head>
<body <?php body_class(); ?>>
\t \t
\t <?php if(function_exists('WC')): ?>
\t \t <?php get_template_part('tpls/header-cart'); ?>
\t <?php endif; ?>
\t
\t <?php if(! defined("NO_HEADER_MENU")): ?>
\t <div class="wrapper">
\t \t
\t \t <?php
\t \t
\t \t define("HAS_SLIDER", in_array('revslider/revslider.php', apply_filters('active_plugins', get_option('active_plugins'))) && function_exists("register_field_group") && ($revslider_id = get_field('revslider_id')));
\t \t
\t \t # Menu
\t \t if(HEADER_TYPE == 1)
\t \t {
\t \t \t get_sidebar('menu');
\t \t }
\t \t else
\t \t if(in_array(HEADER_TYPE, array(2,3,4)))
\t \t {
\t \t \t get_sidebar('menu-top');
\t \t \t
\t \t \t # Slider
\t \t \t if(HAS_SLIDER)
\t \t \t {
\t \t \t \t if(is_search())
\t \t \t \t \t echo "<div style='height: 30px;'></div>";
\t \t \t \t else
\t \t \t \t \t echo putRevSlider($revslider_id);
\t \t \t }
\t \t }
\t \t ?>
\t \t
\t \t <div class="main<?php echo HEADER_TYPE == 1 && HAS_SLIDER ? ' hide-breadcrumb' : ''; ?>">
\t \t
\t \t \t <?php get_template_part('tpls/breadcrumb'); ?>
\t \t \t
\t \t \t <?php
\t \t \t # Slider
\t \t \t if(HEADER_TYPE == 1 && HAS_SLIDER):
\t \t \t \t ?> \t \t \t \t
\t \t \t \t <div class="rev-slider-container row">
\t \t \t \t \t <?php echo putRevSlider($revslider_id); ?>
\t \t \t \t </div>
\t \t \t \t <?php
\t \t \t \t
\t \t \t endif;
\t \t \t ?>
\t
\t <?php endif; ?>
<div class="page-container">
\t <?php if($is_vc_page === false): ?>
\t \t <div class="col-md-12">
\t \t \t <div class="white-block block-pad">
\t \t \t \t <h1 class="single-page-title"><?php echo the_title(); ?></h1>
\t \t \t \t
\t \t \t \t <div class="post-content">
\t \t \t \t \t <?php the_content(); ?>
\t \t \t \t </div>
\t \t \t \t
\t \t \t </div>
\t \t </div>
\t <?php else: ?>
\t \t <?php the_content(); ?>
\t <?php endif; ?>
\t
\t \t <div id="myshop_wrap">
\t \t <div id='top_basket'></div>
\t \t <div id="myshop"></div>
\t </div>
\t
\t \t <script>
\t \t var spread_shop_config= {
\t \t "shopName" : "hitoworld",
\t \t "locale" : "us_US",
\t \t "prefix" : "//shop.spreadshirt.com",
\t \t "baseId" : "myshop"
\t \t };
\t \t </script>
\t \t <script type="text/javascript" src="//shop.spreadshirt.com/shopfiles/shopclient/shopclient.nocache.js"></script>
\t
\t
</div><!--page-container-->
\t
\t \t \t \t
\t \t
感謝您的回覆,我只是添加了代碼,#myshop是原因,因爲我無法更改#myshop.max的最大寬度 – conan
您是否解決了您的問題? –
現在我看到了你的代碼,看起來你正在使用bootstrap,對吧?如果是這樣,你有一個完全不同的問題。 –