简体   繁体   English

半页宽度的背景

[英]half page's width background

I'm trying to create a menu which is divided by 50% width. 我正在尝试创建一个菜单,该菜单除以50%的宽度。
this is what i've been trying so far: 到目前为止,这是我一直在尝试的方法:
http://jsbin.com/gobacewovu/1 http://jsbin.com/gobacewovu/1

so, as you can see, my problem is that the "search" text is invisible. 因此,如您所见,我的问题是“搜索”文本不可见。 I noticed this problem and created another page, using a "menu" class. 我注意到了这个问题,并使用“菜单”类创建了另一个页面。
http://jsbin.com/melekitata/1 http://jsbin.com/melekitata/1

the problem is now bigger. 现在的问题更大了。 I was even looking for a solution in this site but I have not found a solution yet, though. 我什至在这个网站上都在寻找解决方案,但是我还没有找到解决方案。

does anyone can help me with that, I'm seriously stuck. 没有人可以帮助我,我被严重卡住了。 thanks. 谢谢。

It is because #look has fixed position, you would need to give #search position: relative; z-index: 1; 这是因为#look位置固定,您需要指定#search position: relative; z-index: 1; position: relative; z-index: 1; to place it higher up the stacking order. 将其放在更高的堆叠顺序上。

CSS CSS

#search {
  position: relative;
  z-index: 1;
}

I'm not completely sure what you are trying to achieve with this layout however but if you give me some more info I can help you. 我不确定您要使用此版式实现什么,但是如果您给我更多信息,我可以为您提供帮助。

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

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