你好,你能帮我制作一个像这个导航栏的导航栏..我已经制作但它不好,它只用一个宽度,如果我改变宽度lettel它只是不好用
代码:
<nav>
<ul class="beg-container">
<!-- beg-->
<li>
<!-- insusfful-->
<ul class="left-container">
<!-- left-->
<li class="protectionn" style="width: 276px; border-right: 1px solid lightgray;">
<a href="#"><img src="images/protection.png" width="20px;">payment protection program</a>
</li>
<li style="width: 119px; border-right: 1px solid lightgray; "><a href="#">how we work</a></li>
<li class="televesionn" style=" padding-left: 10px">
<a href="#"><img src="images/televesion.png" width="20px"> watch our latest film</a>
</li>
</ul>
</li>
<li>
<!-- insusfful-->
<ul class="right-container">
<!-- right -->
<li><a href="#">post buy requirement</a></li>
<li style="width: 150px; border-left: 1px solid lightgray;" style="width: 276"><a href="#">dowload app</a></li>
<li style="width: 50px; border-left: 1px solid lightgray;"><a href="#">help</a></li>
<li style="width: 175px; border-left: 1px solid lightgray;"><a href="#">+9196969696</a></li>
</ul>
</li>
</ul>
</nav>
<!-- end of navbar -->
答案 0 :(得分:0)
你会在更大的屏幕上看到它更好
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "dbname";
// Create connection
$con = new mysqli($servername, $username, $password,$dbname);
if ($con->connect_error)
{
die("Connection failed: " . $con->connect_error);
}
?>
<select name="acad_period" required="">
<option value="0">Select</option>
<?php
$s= "SELECT a.fk_acadyear_id as acadyearid,b.acad_year as acadyear FROM tbl_admparam a inner join list_acad_years b on a.fk_acadyear_id = b.pk_acad_year_id";
$ex= $con->query($s);
if (!$ex)
{
echo("Error description: " . mysqli_error($con));
}
else
{
while ($f= $ex->fetch_assoc())
{
?>
<option value="<?php echo $f['acadyearid'] ?>"><?php echo $f['acadyear'] ?></option>
<?php
# code...
}
}
?>
</select>
li,ul{
display: flex;
}
ul{
justify-content: space-between;
}