我遇到了一个问题..我希望通过浏览器扩展而不是主体内容来增加横幅。所以我想不允许身体内容扩展,我会做以下媒体查询:
@media (min-width:1281px){
#homepage .carousel .carousel-caption {
left:auto;
right:auto;
max-width:1263px;
margin-left:70px;
}
/*.footer-links{
margin:auto;
max-width:1263px;
}
.bodyPages{
margin:auto !important;
max-width:1263px !important;
}
#searchForm{
margin:auto !important;
max-width:1263px !important;
}
}*/
/*.content-wrapper{
margin:auto;
max-width:1263px !important;
}
.carousel-wrapper{
max-width:100%;
}*/
body{
max-width:1263px !important;
margin:auto;
}
:not(.carousel-inner img){
}
.carousel-inner img {
height: auto;
width: 100%;
}
}
更新2:
<cfoutput>
<cfinclude template="inc/html_head.cfm" />
<body id="#$.getTopID()#" class="#$.createCSSHook($.content('menuTitle'))#" data-spy="scroll" data-target=".subnav" data-offset="50">
<!--- <cfinclude template="inc/navbar.cfm" /> --->
<!--- Navbar's display below is set to absolute position --->
<cfinclude template="inc/navbar_ap.cfm" />
<div id="resizable-section">
<!---
The Carousel/Slideshow
Refer to the theme's contentRenderer.cfc for details on this method and its arguments/options
NOTES:
* This theme is designed for Mura 6.1+
* Only content items with an 'Associated Image' will be rendered
* You can control the crop of the carousel image by using the custom defined 'carouselimage' image size // 'carouselimage'
--->
<!--- #$.dspCarouselByFeedName(
feedName='Slideshow'
, showCaption=true
, cssID='myCarousel'
, size='carouselimage'
, interval=5000
, autoStart=true
)# --->
#$.dspCarouselByFeedName(
feedName='Slideshow'
, showCaption=true
, cssID='myCarousel'
, size='custom'
, interval=10000
, autoStart=true
)#
<div class="container-fluid bodyPages">
<div class="row">
<!-- expanded width of the following section. -->
<!--<section class="col-lg-8 col-md-8 col-sm-12 col-xs-12 content">-->
<section class="col-lg-offset-1 col-lg-10 col-md-12 col-sm-12 col-xs-12 content" id="home-content">
<!--- The content --->
#$.dspBody(
body=$.content('body')
, pageTitle=''
, crumbList=false
, showMetaImage=false
)#
<!--- Display Objects assigned to display region 2 (Main Content) --->
#$.dspObjects(2)#
</section>
<aside class="col-lg-3 col-md-4 col-sm-12 col-xs-12">-->
<!--- Display Objects assigned to display region 3 (Right Column) --->
<!--#$.dspObjects(3)#-->
<!--</aside>-->
</div><!--- /.row --->
<cfinclude template="inc/footer.cfm" />
</div><!-- /.container -->
</div><!-- /.resizable-text -->
<cfinclude template="inc/html_foot.cfm" />
答案 0 :(得分:0)
我相信您遇到的问题是因为您为整个身体设置了最大宽度,并且您的横幅位于体内。这意味着您的横幅永远不会大于您指定的1263px最大宽度。
您需要为内容创建包装器,而不是更改整个主体的大小。您还需要为横幅创建一个包装器。
这里有一些HTML:
<body>
<div class="banner">
Banner Content goes here
</div>
<div class="content-wrapper">
Page content goes here
</div>
</body>
和一些CSS:
body {width:100%;}
.content-wrapper {
max-width:1263px;
}
.banner-wrapper {
width:100%;
}