bsr
bsr

Reputation: 58742

Basic css question

please see http://jsfiddle.net/8mmbA/1/

How to make a separation between coordinate and dimension div , say 10 px. I tried margin and padding. For dimension the margin adds from coordinate 0 (left most part in the page), not from the previous div.

thanks.
bsr.

Upvotes: 0

Views: 68

Answers (4)

Hubro
Hubro

Reputation: 59408

margin-right on the left div

http://jsfiddle.net/8mmbA/9/

Upvotes: 0

Keith
Keith

Reputation: 5391

You need to add float:left to your dimension:

#location #dimension{float:left; margin-left:10px;}

Upvotes: 1

David Houde
David Houde

Reputation: 4778

You can add padding-right: 10px; to the Coordinate div.

Upvotes: 0

easwee
easwee

Reputation: 15915

http://jsfiddle.net/easwee/8mmbA/10/

Set it to display:block else margins won't trigger.

Upvotes: 0

Related Questions