html - Overflow:Visible outside the container -


i have fixed width div paragraph inside.

demo: http://jsfiddle.net/hrasz/1/

the paragraph styled following css:

p {     white-space: nowrap;     overflow: hidden;     background: grey;     color: white;     text-overflow: ellipsis;         } 

i add new css class p:hover, , show hidden text when hovered.

p:hover {     white-space: nowrap;     overflow: visible;     background: grey;     color: white;         } 

but seems text using overflow: visible, not background color. there way achieve this?

note: can't change div with.

paragraphs block elements - take width of containers, not content. try this

p:hover {     display:inline-block;     white-space: nowrap;     overflow: visible;     background: grey;     color: white;         } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -