On Mar 1, 2010, at 12:17 AM, MEM wrote:

> Here is the source information:
> http://www.nuvemk.com/formacao_lx/outros/ul_li_tests.html - the css styles
> are inside.
> 
>               3.1)    
>               I see that, to solve it, we can use the float property to 
>               eliminate that extra space between inline elements. 
>               Why is that? Is it because the float property tell us 
>               by definition, that if we have, for example, 3 floated 
>               elements they will/should place themselves on the outer 
>               edge of the previous floated element or container?

Ingo already gave you an explanation for what that space is (white-space nodes 
in the html mark-up)
When you float the element or otherwise set to to display block, html parsing 
rules kicks in, and basically those nodes are suppressed for display purposes.

> 
>               4)
>               On the - .navegacao ul li a -  declaration block, 
>               we can't add padding-top and bottom, they will not be
>               rendered on the viewport. Why? Because we are treat them
>               as inline elements and not, block box elements. 
>               Is this precise?
> 
>               Why line-height doesn't work either?

the parent UL & DIV are set to 'overflow:hidden', the <a> elements are set to 
display: inline. The padding (top and or bottom) is applied to the elements, 
but because it is an inline element, the excess padding will be clipped by the 
overflow:hidden.

Line-height should affect the layout though.

Please play a little with Firebug or Safari's webKit inspector; you can toggle 
properties on elements on/off, or add properties as needed/wanted and see the 
effect on your layout. It also helps adding background-colours/borders or the 
outline property to various elements to see what affects what.

>               5)
>               The question that make all those be here: "how can I 
>               put a background on the navigation, that goes beyond 
>               the right border height? 
>               Since we can have no padding nor line-height, should 
>               we apply the background color to a parent element? 
>               Which one?
>               
>               Let's imagine that the background color should start 
>               on the top ---- and end on the bottom ---- : 
>               ---------  ---------
>               | item1 |  | item2 |
>               ---------  ---------

ul {background: lime; padding: 5em 0; } ?

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to