简体   繁体   English

如何设置响应式轮播的宽度?

[英]How to set width of responsive carousel?

I am developing a website with carousel slider but carousal slider goes to the outside external div. 我正在开发一个带有轮播滑块的网站,但轮播滑块指向外部外部div。 It is because of carousel Slider takes dynamic width with related to screen resolution. 这是因为轮播Slider会采用与屏幕分辨率有关的动态宽度。 Should anybody help me to fix it. 应该有人帮助我修复它吗? What i done is here : http://code-dynamix.com/blazemedia/fdfs.html 我在这里所做的是: http : //code-dynamix.com/blazemedia/fdfs.html

The problem in the above link is in division above the footer. 以上链接中的问题在于页脚上方的划分。 Thanks in advance. 提前致谢。

You want the overflow: hidden; 您想要溢出:隐藏; in your div class (.upcoming) this would hide anything outside the box 在您的div类(.upcoming)中,这将隐藏框外的所有内容

Please try this 请尝试这个

.upcoming{
overflow: hidden; /* inside overflow:hidden; in main div */
}
.caroufredsel_wrapper{
  overflow: hidden;
  left: 126px;
}

Add width 100% for caroufredsel_wrapper class, overflow: hidden for .upcoming div. 为caroufredsel_wrapper类添加100%的宽度,溢出:对于.upcoming div隐藏。 That is 那是

.caroufredsel_wrapper {
    width : 100% !important; 

} }

.upcoming {
    overflow: hidden;
}

in css file. 在css文件中。

Thanks. 谢谢。

  • Try setting the width to 100%. 尝试将宽度设置为100%。
 <div id="wrapper"> <div id="carousel"> <div><img src="img" /></div> <div><img src="img" /></div> <div><img src="img" /></div> <div><img src="img" /></div> </div> <div id="title"> <h3>Header</h3> <p><a href="#">Link Name</a></p> </div> <div id="pager"></div> </div> 

Problem is this : you have given inline-css to the divs... 问题是这样的 :您已将inline-css赋予div ...

width:510px; height:396px; background:url(images/Layer61new.png); position:absolute;

so no water whatever you give in the css, inline-css would always over-write the width and height coming from the css 因此,无论您在CSS中输入多少水, inline-css都将始终覆盖来自CSS的widthheight

How to recover? 如何恢复? Remove all the inline css if you want a responsive stuff and play with width and height through your css....because on resizing....your stuffs are getting hidden withouth resizing.... this is not responsive thing, its just hiding the mess :) 如果您想要一个响应式的东西并通过CSS进行widthheight ,请删除所有内联CSS。...由于调整大小....您的东西被隐藏而没有调整尺寸.... 这不是响应式的东西,它只是隐藏烂摊子 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM