У меня странное пустое место в верхней части одного из моих div.Удалите пробелы, которые не видны в коде
Heres HTML-:
<!-- ### Bottom content container ### -->
<div class="bottom_content">
<div class="messages"><!-- include problems.php - down devices -->
<?php include "problems.php";?>
</div>
</div>
<!-- ### End bottom content container ### -->
Когда я анализирую вывод я замечаю Есть два ""
после комментария внутри messages
класса. Как это:
<div class="messages"><!-- include problems.php - down devices -->
" "
<?php include "problems.php";?>
</div>
messages
Херес CSS:
.messages {
display:block;
width: auto;
padding: 10px;
padding-top: -10px; /* Added this to try to remove blank space in top of div */
background: rgb(255, 255, 255); /* The Fallback */
background: rgba(255, 255, 255, 0.5);
-moz-border-radius: 10px;
border-radius: 10px;
border: #ffffff 1px solid;
}
Это создает пустую строку в верхней части дел. Как я могу удалить это? Я не могу найти эти два ""
в любом месте кода, а также не могу найти пробелы.
EDIT: Вот problems.php:
<center><div id="chkerror"></div></center>
Это autofilled с содержимым из отдельного файла PHP каждые 30 секунд с помощью следующей JQuery:
// <![CDATA[
$(document).ready(function() {
$.ajaxSetup({ cache: false }); // This part addresses an IE bug. without it, IE will only load the first number and will never refresh
setInterval(function() {
$('#chkerror').load('chkIncludes.php');
}, 30000); // the "30000" here refers to the time to refresh the div. it is in milliseconds.
});
// ]]>
И Херес содержание chkIncludes.php:
<?php include "chkLoc1.php";?>
<?php include "chkLoc2.php";?>
chkLoc1.php и chkLoc2.php содержит:
<?php
$host = "10.10.10.1";
$loc = ("Location 1");
$output = array();
exec("ping -n 1 $host 2>&1", $output);
//you can use print_r($output) to view the output result
if (count($output) > 7) {
$output = null;
$status = ("up");
$formattedstatus = ("<font color='green'><b>$status</b></font>");
}
else {
$output = null;
$status = ("down");
$formattedstatus = ("<font color='red'><b>$status</b></font>");
};
echo ("<div class='$status'><a href='#18/58.99940/5.62324' class='locLink' title='Click to show'><b>$loc</b> <i>(IP: $host)</i> is $formattedstatus</a></div>");
?>
Есть некоторые LINEBREAK в 'problems.php'? Может быть, он пытается повторить пустой массив или что-то еще? Можете ли вы показать нам 'problems.php'? – Pogrindis
Вы говорите, что на выходе появляются два символа двойной буквы? Если это так, то не CSS делает это, это ваш PHP. –
также публикуйте свои проблемы. Php и ваш вывод html содержат Php include "problems.php";?>? – Codelord