Rhythem Aggarwal
Rhythem Aggarwal

Reputation: 356

Set width of a Li to whatever is left in its container div

I am facing a css problem. I cannot get a Li to occupy whatever width is left in a div How can i possibly do this?

Here is an image for reference: http://rhythemaggarwal.heliohost.org/login/css/ques.png

Link to my webpage: http://rhythemaggarwal.heliohost.org/login/index.html

Upvotes: 0

Views: 175

Answers (2)

cobaco
cobaco

Reputation: 10546

change your css as follows:

#menu ul li {
  display: table-cell;
  white-space: nowrap;
}

and then add

#news_link { width: 100%;} 

that will do what I think you want

Upvotes: 1

Andy
Andy

Reputation: 14575

Remove the border-right from #menu ul li (change to border: 0;) and it works for me

Upvotes: 0

Related Questions