不能让我的div保持固定布局 [英] Can't get my div to stay fixed with layout

查看:98
本文介绍了不能让我的div保持固定布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对css,div和其间的一切都很新。

I'm quite new to css, divs and everything in between.

所以,我为我的乐队创建了一个基本布局,不想要一堆无用的链接,如生物,商店和所有。所以我只是决定为我们的视频,一个播放器和一个Facebook窗口安排单独的空间。

So, i created a basic layout for my band, didn't want a bunch of useless links like bio, merch store and all that. So i just decided to arrange separate spaces for our video, a player and a facebook window.

我设法为youtube iframe创建一个div,但我不能让它停留在它的位置,当我调整窗口大小。我试过改变定位一次,绝对,固定,相对...等。没有运气。

I managed to create a div for the youtube iframe, but i can't get it to stay in its place when i resize the window. I've tried changing the positioning a bunch of times to absolute, fixed, relative...etc. No luck.

在我看来,布局是没有什么奇特,只是一些快速看,并得到一些基本的乐队信息。

Keep in my mind that the layout is nothing fancy, just something quick to look at, and get some basic info of the band.

以下是链接: http://silentcellmusic.com/test.html

Thx提前!

推荐答案

< center> 标记,将#apDiv1的css更改为:

Get rid of the <center> tag altogether and change the css for #apDiv1 to:

#apDiv1 {
   position: absolute;
   left: 597px;
   top: 489px;
   width: 400px;
   height: 223px;
   z-index: 1;
}

这篇关于不能让我的div保持固定布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆