In article <k7per0$bes$
5...@speranza.aioe.org>,
Cezary Tomczyk <
cezary....@gmail.com> wrote:
> W dniu 2012-11-12 00:48, dorayme pisze:
> > I was just hoping to get you to explain with a realistic example. It
> > does not seem to me even slightly tempting to put overflow: hidden on
> > your markup. What would tempt or drive someone to want to? What would
> > their motivations be? That it cuts off the particular element in your
> > markup is true. But so what?
>
> Let say we have a menu based on un(ordered) list (example, very simple
> version):
>
> ul
> li a href="url">Link1</a /li
> li a href="url">Link1</a /li
> /ul
>
> (sorry about html, but NNTP provider do not allow html tags)
>
That's OK. I know what you mean.
> ul{ overflow: hidden; }
> li { float:left; }
> li a{ display:inline-block; }
>
> And if you want to move <a> on :hover status slightly up, let's say
> 0.25em, then you can do this by (one of the solution):
>
> ul li a:focus,
> ul li a:hover{
> position:realtive;
> top:-0.25em;
> }
>
> Now, <a> on :hover status will be cut.
>
> Is this realistic?
>
Well, I am getting the technical point, fine.
If the motivation (*still* missing from your example) was to make a
border on the UL drop to enclose the menu items, that would be a
motivation.
If an author wanted to play jiggly jiggly with links for the modern
man on the Clapham bus, and if he did not want to make a little
padding at the top of the UL, (the most natural thing to do in your
example), then yes, overflow would cut it off if you :hovered a bit
more than .25em (at .25em, on Safari, I am not seeing actual cut off,
rather I am seeing and hearing the poor hovered link bang it's head
against an included border and scream in pain. <g>)
> This is just an example. There could be many more situation. I can not
> count every of them. Just wanted to point that clearing floats using
> overflow:hidden; could be risky due to problems I described before.
Your technical point is noted. The risk is dependent on rather special
contexts which, I am getting the feeling now, are rare.
--
dorayme