Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi added CSS but doesnt seem to be working? Can someone help?

What I have tried:

nameFinder.php
  echo '
<center>
<table class="tableBG">
<tr>
<th>Boy Names</th>
<th>Girls Names</th>
</tr>';

  $i = 0;
  while($i < $count) {
    echo '<tr>';
    if(isset($arr['BoysName'][$i])) { echo '<td>'.$arr['BoysName'][$i].'</td>'; }
    else{ echo '<td class="noBorder"> </td>'; }
    if(isset($arr['GirlsName'][$i])) { echo '<td>'.$arr['GirlsName'][$i].'</td>'; }
    else{ echo '<td class="noBorder"> </td>'; }
    echo '</tr>';
    $i++;
  }


CSS:
.tableBG {
  border:0;
  width:400px;
}
.tableBG th, .tableBG td {
  border:1px solid gray;
}
.tableBG td.noBorder {
  border:0;
}
Posted
Comments
David_Wimbley 11-Feb-18 14:51pm    
Unfortunately what you've provided doesn't tell us if your CSS is working properly. You need to make sure within the tags of your HTML you are referencing your CSS file appropriately. If your CSS isn't working, that is the first place to start.
Member 13637584 11-Feb-18 14:57pm    
Hi, i have
link href="css/styles.css" rel="stylesheet" type="text/css"
referenced at top of my sheet? other CSS is working but not this one?
ZurdoDev 12-Feb-18 14:29pm    
You have to debug this. Use your browser's developer tools to find out what is happening.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900