views:

96

answers:

3

could one use overflow:hidden for both sides?

cause i want the row to be centered.

EDIT: ive got a row of link elements. i want it to be like: http://jqueryfordesigners.com/coda-popup-bubbles/

the row will stick out both to the left and right. not just on the right side. with other words: i want to center a very long row within a div which is styled with overflow:hidden and white-space: nowrap.

here is my code:

http://jsbin.com/afuni/edit

if the row is too long the right elements wont be shown. i want the left elements to not be shown too so that the center link will always be in center.

A: 

What do you mean by both sides?

Emil
Ask for clarifications in comments.
Tatu Ulmanen
ive got a row of link elements. i want it to be like: http://jqueryfordesigners.com/coda-popup-bubbles/ the row will stick out both to the left and right. not just on the right side. with other words: i want to center a very long row within a div which is styled with overflow:hidden and white-space: nowrap.
weng
@tatu : I was not able to add a comment.http://drp.ly/n4f3N
Emil
A: 

Nope, you can't make the text clip from both edges using overflow: hidden, you need additional markup with negative margins etc. Not worth the trouble I think.

Tatu Ulmanen
+1  A: 

overflow: hidden will hide content that doesn't fit inside it's box model. Based on the question asked, I believe there is a different CSS solution for you. Can you post the HTML/CSS and your objective?

edit: to center a row that may extend outside its boundaries, I would use z-index: 100, position: relative, and text-align: center. I need to check your markup, however. Hope that helps!

nickelleon
please read my update.
weng
i pasted my code into my question
weng