Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7584285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:52:58+00:00 2026-05-30T18:52:58+00:00

I have a div on the main page: <div id=Alerts class=Alerts><a class=handle href=></a></div> I’m

  • 0

I have a div on the main page:

<div id="Alerts" class="Alerts"><a class="handle" href=""></a></div>  

I’m populating this div with others div at run time:

function CreateDivIncident(errorcode, name, address, lat, lng) {  
var div = CreateDefaultDiv('Alerts');  
var html = errorcode + '</b> Name:' + name + ' Address: ' + address;  
div.innerHTML = html;  
google.maps.event.addDomListener(div, 'mouseover', function () { div.style.backgroundColor = '#55FFFF'; });  
google.maps.event.addDomListener(div, 'mouseout', function () { div.style.backgroundColor = 'white'; });  
google.maps.event.addDomListener(div, 'mouseup', function () { gmap.panTo(new google.maps.LatLng(lat, lng)); });  
}

function CreateDefaultDiv(parent) {  
var div = document.createElement('div');  
div.style.marginBottom = '5px';  
div.style.backgroundColor = 'white';  
div.style.border = 'solid 1px';  
div.style.fontSize = "16px";  
div.style.fontFamily = "Arial";  
div.style.paddingRight = "5px";  
document.getElementById(parent).appendChild(div);  
return div;  
}

The new divs are showing and acting to clicks well but the parent div isn’t growing its height correspondingly. The new divs are just “floating” above it.

What am I missing here? Any advice will be welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:53:00+00:00Added an answer on May 30, 2026 at 6:53 pm

    Write float:left css rule on .Alerts or #Alerts. Parent container will take the height and width. By using border:1px solid red; on your parent div and child divs you do testing, i mean which element is outside and which one is inside. By identifying the boundaries.

    Update: Remove the height 110px;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple HTML page that looks like this: ...<div id="main"> <a href="#">Click
i have this main page index.html <script> $(document).ready(function(){ $(#content).load('page.html'); $(#menu).click(function () { alert('Hello'); });
The Idea I have a main PHP page that loads content in DIV's from
Hey Guys, i have created the following Menu Structure: <div id=menu> <ul> <li><a href=#>Main
1) on main page i have javascript function function editSuccess(data) { alert(editSuccess called); }
I have a main div on my page that has the attribute align=center ,
In my main page, I have a div showing some external html content. Here
I have 2 div in on page <div id=main></div> <div id=panel></div> and using float
For example I have a main page with a div ( or something of
Basically i have a div on my main page that contains the content, now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.