Share Coding

Tutorials, Problems, Stuffs …

Div has equal width and space

Example: three or two span share the equal space in a row. (inline-block)

space

html:


div

span span span

div

CSS:


.div-detail-row {
display: flex;
text-align: justify;
-ms-text-justify: distribute-all-lines;
text-justify: distribute-all-lines;
justify-content: space-between;
}

.div-detail-row span{
width: auto;
display: inline-block;
line-height: 0;
}

if you are using div, not span:

display: inline-block;
*display: inline;
zoom: 1
Still not understand?  Paste your Html and CSS code her, we think togeather.
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: