I'm catching a GET request from another page with PHP and displaying all the info to the user with something that looks like this (Using bootstrap):
But I'm getting this:
I'm using the alternative syntax for control structures and works fine. But the CSS is not applied and I don't know why. This is the relevant code:
<?php
$transactionId = $_REQUEST['transactionId'];
if ($_REQUEST['transactionState'] == 4 ):
$estadoTx = "Transacción aprobada";
?>
<div class="container-fluid">
<ul>
<li class="row">
<span class="itemName" id="quantity_first_product">Estado de la transaccion: </span>
<p class="description"><span id="state"></span></p>
</li>
<li class="row">
<span class="itemName" id="quantity_first_product">ID de la transaccion: </span>
<p class="description"><span id="transactionID" ></span></p>
</li>
</ul>
</div>
<script type="text/javascript">
var transaction_state;
var transactionState_span = document.getElementById("state");
transaction_state = <?php echo json_encode($estadoTx); ?>;
transactionState_span.innerHTML = transaction_state;
var transaction_id;
var transactionID_span = document.getElementById("transactionID");
transaction_id = <?php echo json_encode($transactionId); ?>;
transactionID_span.innerHTML = transaction_id;
</script>
<?php else:
$estadoTx=$_REQUEST['mensaje'];
?>
<h1>Determinar que sucede</h1>
<?php endif; ?>
The two CSS styles are:
.itemName{
color: #727578;
font-size :16px;
font-weight: bold;
float: left;
padding-left:25px;
margin-right: 25px;
}
.description{
color: #4ea6bc;
font-size :18px;
font-weight: bold;
float : left;
padding-left: 15px;
}
When the code is executed by the browser, the PHP code inside the javascript lines works fine:
I'm doing my best but nothing works. Sorry for the long post and thanks for any help!
EDIT
The CSS is imported in the head section
<link rel="stylesheet" type="text/css" href="assets/css/custom.css"/>
and sorry for the duplicated IDs, some ctrl-c ctrl-v issues.



