Div宽度在Firefox中不起作用 [英] Div width not working in firefox

查看:83
本文介绍了Div宽度在Firefox中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我创建了简单的下拉菜单,在div中放置了css放置菜单,我将div宽度设置为100%,在IE中工作正常,但在firefox中宽度没有变化菜单。

如何解决这个问题。提前致谢。



这是我的编码

  div  
{ width 100%;
margin 10px 0;
背景 #324143;
padding 0px 0px;
}

解决方案

试试以下

< br $> b $ b

  div  
{宽度 100%;
MARGI n 10px 0;
背景 #324143;
padding 0px 0px;
位置 relative
}


Hi all,
I have created simple dropdown menu with css placed menu in div and i have set div width to 100% its working fine in IE but not in firefox that is width getting changed according to menu.
How to solve this. Thanks in advance.

This is my coding

div
	{	width: 100%;		
		margin: 10px 0 ;
		background: #324143;
		padding: 0px 0px;
		}

解决方案

Try following


div
    {   width: 100%;
        margin: 10px 0 ;
        background: #324143;
        padding: 0px 0px;
        position:relative
        }


这篇关于Div宽度在Firefox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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