D
D
des1roer2015-03-18 07:38:58
css
des1roer, 2015-03-18 07:38:58

CSS (yii) sliding menu?

I have such an ugly picture
szos3u1.png

#mainmenu
{
  /*background:white url(bg.gif) repeat-x left top;background-image:url(http://inventory.simpson.com/dashboard-download/images/el_bg.png);*/
  background-color:#333333;
  height: 42px;
  width: 100%;
        
}

#mainmenu ul
{
  padding:6px 20px 5px 20px;
  margin:0px;
  
}

#mainmenu ul li
{
display: inline;
  //display: table-cell;
  background-attachment:initial;
  background-clip:initial;
  background-color:#333333;
  background-image:url(../images/el_bg.png);
  background-origin:initial;
  background-position:0 0;
  background-repeat:repeat no-repeat;
  border-bottom-color:initial;
  border-bottom-style:none;
  border-bottom-width:initial;
  border-image:initial;
  border-left-color:#222222;
  border-left-style:solid;
  border-left-width:1px;
  border-right-color:#222222;
  border-right-style:solid;
  border-right-width:1px;
  border-top-color:#222222;
  border-top-style:solid;
  border-top-width:1px;
  float:left;
  list-style-type:none;
  margin-bottom:0;
  margin-left:0.1em;
  margin-right:0.1em;
  margin-top:0;
  position:relative;  
  padding-left:20px;
  padding-right:20px;
  height:35px;
}

how to make it not slip

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Bay, 2015-03-18
@kawabanga

possibly -
display: table-cell;
but you need to look at what depends.

D
des1roer, 2015-03-18
@des1roer

#mainmenu
{
background-color:#333333;
height: 42px;
width: 9000px
}
I don't know how correct

N
NO, 2015-03-18
@Mihail9575

Try replacing #mainmenu ul li display: inline;withdisplay: inline-block;

Z
zuraavl, 2015-03-18
@zuraavl

yes, for ul {display:tabel; widht: 100%;}
For li {display: tabel-cell;} and you can also set the width, for example, if you have 5 points, then 20%. And remove the margin and padding everywhere, and of course the float

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question