View Single Post
Old 11-17-2012, 11:38 PM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by cm123077 View Post

Any idea how I can make the height of the info box the same size as the content with css?
Instead of specifiying a height, just let the element work on it's own. It will size itself to it's contents if you let it.


Code:
.leaflet-popup-content-wrapper {
    /*height: 300px !important;*/
    width: 450px !important;
}
.leaflet-popup-content-wrapper {
    /*height: 300px !important;*/
    width: 450px !important;
}
.leaflet-popup-content {
    /*height: 400px !important;*/
    width: 400px !important;
}


and in your markup you have some inline style that could go away -
Code:
<div style="width: 301px; height: 160px;" class="leaflet-popup-content leaflet-popup-scrolled">
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
cm123077 (11-18-2012)