javascript - Two div elements conflict? -


the problem encountering when try load dashboard.html in javascript , put <div id="dash" style="..."></div> below <div id="toolbar"> whole dashboard.html file invisible? if put <div id="toolbar"> below <div id="dash" style="..."></div> dashboard.htmlis visible? want toolbar above , not below, how can make work?

index.html (this not work because dash below toolbar..)

<!doctype html> <html> <head>      <script src="js/jquery-2.1.3.min.js"></script>      <script src="js/bootstrap.min.js"></script>      <link rel="stylesheet" type="text/css" href="css/bootstrap.css">      <script type="text/javascript" src="canvasjs-1.6.2/canvasjs.min.js"></script>      <link rel="stylesheet" type="text/css" href="css/style.css">      <script>          $(function(){          $("#toolbar").load("topnavigationbar.html");         $("#dash").load("dashboard.html");         });      </script>   </head> <body>        <div id="toolbar">       <div id="dash" style="height:600px;width:1280px; background-image: url('img/dashboard-layout.png'); background-repeat: no-repeat; background-color: #303032;"></div>  </body> </html> 

index.html (this works because dash above toolbar..)

<!doctype html> <html> <head>      <script src="js/jquery-2.1.3.min.js"></script>      <script src="js/bootstrap.min.js"></script>      <link rel="stylesheet" type="text/css" href="css/bootstrap.css">      <script type="text/javascript" src="canvasjs-1.6.2/canvasjs.min.js"></script>      <link rel="stylesheet" type="text/css" href="css/style.css">      <script>          $(function(){              $("#toolbar").load("topnavigationbar.html");         $("#dash").load("index.html");         $("#selecttable").load("listoftablesensors.html");          });      </script>   </head> <body>       <div id="dash" style="height:600px;width:1280px; background-image: url('img/dashboard-layout.png'); background-repeat: no-repeat; background-color: #303032;"></div>         <div id="toolbar">   </body> </html> 

you need close

<div id="toolbar"> 

change

<div id="toolbar"></div> 

and should want.

to test try

<div id="toolbar">hello</div>   <div id="dash" style="height:600px;width:1280px; background-image: url('img/dashboard-layout.png'); background-repeat: no-repeat; background-color: #303032;"></div> 

and see hello above dash div.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -