gpt4 book ai didi

html - ul 改变了我所有的风格

转载 作者:行者123 更新时间:2023-11-28 11:09:08 24 4
gpt4 key购买 nike

我有一个菜单栏,我想删除配置文件标签,所以我放了一个 <ul>

<html>
<head>
<title><?php $title; ?></title>
<link rel="stylesheet" type="text/css" href="css/main.css">
<meta charset="utf-8">

<div class="centrado-fluid">
<div class="loginregister"></div>
<div class="espacio"></div>
<div class="menu">
<a href="index.php"><p class="menuleft">Home</p></a>
<a href="pelis.php"><p class="menuleft">Películas</p></a>
<a href="series.php"><p class="menuleft">Series</p></a>
<input class="buscador" type="text" placeholder="Busca">
<a href="apeli.php"><p class="menuright">Añadir Serie</p></a>
<a href="aserie.php"><p class="menuright">Añadir Película</p></a>
<ul><p class="menuright">Profile</p></ul>
</div>
<hr class="linea">
</div>

</head>
<body>

当我把 <ul> <p>资料下来

这是CSS

.centrado-fluid {
height: 100%;
width: 80%;
background-color: #ffffff;
margin: 0 auto;
}

.menu {
height: 44px;
width: auto;
/*background-color: blue;*/
background: url("../img/slash-layer.png") repeat scroll 0% 0% rgb(99, 99, 130);
border-radius: 15px;
padding-top: 10px;
}

.espacio {
height: 10px;
}

.menuleft {
width: 100px;
height: auto;
margin-top: -2px;
margin-left: 15px;
text-align: center;
background-color: yellow;
border-radius: 10px;
font-family: hasa;
font-size: 20px;
padding-top: 5px;
display: inline;
}

.buscador {
height: auto;
margin-top: -2px;
margin-left: 7%;
text-align: center;
background-color: whitesmoke;
border-radius: 10px;
font-family: hasa;
font-size: 20px;
padding-top: 5px;
display: inline;
}

.menuright {
height: auto;
margin-top: -2px;
float: right;
margin-right: 15px;
text-align: center;
background-color: yellow;
border-radius: 10px;
font-family: hasa;
font-size: 20px;
padding-top: 5px;
display: inline;
}

如何返回?

最佳答案

要标记您的菜单,您可以这样做 - JSFiddle Demo

HTML

<ul class="menu">
<li><a href="#">link</a></li>
<li><a href="#">link</a></li>
<li><a href="#">link</a></li>
<li class="right"><a href="#">link</a></li>
<li class="right"><a href="#">link</a></li>
</ul>

CSS

* { margin:0; padding:0; }    
ul.menu { float:left; width:100%; }
ul.menu li { float:left; margin:0 10px; list-style: none;}
ul.menu a { display:inline-block; padding:5px 10px; background:yellow; }
ul.menu .right { float:right;}

关于html - ul 改变了我所有的风格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22093354/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com