Jump to content

div width


westman

Recommended Posts

not only text, but any inline element will ignore the width/height you give them (style:width/height that is, things like img are different), and they set their dimensions to what it think it needs. if you want an inline element to have a say in what it's width is, you switch their display to inline-block. inline-block will act in almost every way a character in a group of text will, but will also have access to properties like width/height.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...