html - Does a float need a width? -


after lot of research floats confused why there information on web float should have width defined. said, float take whole space , therefore behave normal block element. regard information here http://www.w3.org/tr/css21/visudet.html#shrink-to-fit-float float shrink-to-fit. understand float never take whole space unless needs to.

when thinking navigation items, there need specify width? don't think in case. maybe when content inside float large?

it discussed here do need width on floated element? there no clear statement, not necessary.

i don't think floated elements require fixed widths, perhaps positional css includes dividing page 3 columns, may want consider fixing widths on columns floated left/right. 1 reason because navigation bars or forum posts or sort of list of hyper links aligned on sides of pages, , if these 2 columns not fixed, character limit of anchor links limited screen size decreases. may not want inline anchor tags wrapping across multiple lines when screen shrinks. fixed widths eliminate this.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -