tags:

views:

24

answers:

2

I am write the content in the p tag in one of the li tag(each li tag consists of 4 p tags.).I am place the content inside li tag ,When it overflows it does not cut the string, it occupies the second p tag space.Please give some suggession to avoid in both IE and Firefox.

p         p               p             p
.........................................................
rajufgsag hjfhf           fdsfg         hdsfghd
A: 

Set the overflow setting on the li not the p.

lighthazard
A: 

Define a total width on your <li> and then float your 4 <p> tags within that, each with 1/4 of the <li>'s width:

li {
    width: 200px;
}

li p {
    width: 50px;
    float: left;
}

You shouldn't need to use the overflow property at all.

Pat