Reputation: 1
I currently have a simple application which is fully functional and queries data using php and sql. However, I am struggling to style the website as attributes don't seem to be applying. I am using the following code to wrap my searchbar, dropdown and submit button in a class, with the intentions of centering said class and putting a border around it. Here is the code I am using in the webpage:
IF (!isset($_REQUEST['submit'])) {
//drop down
$sqlDrop = "SELECT DISTINCT ID as contID, Name as contName from w_Continent order by contName;";
$stmtDrop = $db->query($sqlDrop);
//Start a form
echo "<div class='searchWrap'>";
echo "<form action='listCont.php' method='get'>\n";
//Start a select box
echo "<select name='contID'>\n";
echo "<option value=\"0\" disabled selected>Select Continent</option>";
//Loop through all continents
while ($dropdownVar = $stmtDrop->fetchObject()) {
//Display each one as an option in the drop down
echo "\t\t<option value='{$dropdownVar->contID}'> {$dropdownVar->contName} </option>\n";
}//end loop
echo "</select>";
// Put filter textbox here
echo "<input name='countFilter' type='text' placeholder='filter by country name'/>";
// display submit button
echo "<input name ='submit' type='submit' value='Search' />\n";
//end form
echo "</form>";
echo "</div>";
And here is the code used in stylesheet:
.searchWrap {
border-style: solid;
text-align: center;
}
Apologies for big blocks of code, just I need everything which div is wrapped in to show relevant code around the issue. Any help on this would be great. Thanks!
Upvotes: 0
Views: 101
Reputation: 1047
Change this
.searchWrap {
border-style: solid;
text-align:center;
}
to
.searchWrap {
border:1px solid #ccc;
text-align:center;
}
Upvotes: 2