piano0011 Posted July 14, 2018 Share Posted July 14, 2018 Hey guys! I have been trying to learn about CSS and drop down menu from this channel and at 11:01, he uses a float: left in the nav ul li {} element to display them in a straight line instead of display: inline block? I guess there is more than one way of doing things but which way is better? I read from google or stackflow that the latter is the preferred choice? Link to comment Share on other sites More sharing options...
requinix Posted July 14, 2018 Share Posted July 14, 2018 yay, no more ridiculously large videos! float was available earlier, but since CSS 2.1 inline-block is indeed superior for this. Google can offer more on the subject; basically, float has a much more significant impact on elements' positioning, so if all you want to do is "collapse" elements to display side by side then inline-block will have the desired effect without other side effects. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.