Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

wams

Como arrumar esse CSS ? é o que eu acho

Recommended Posts

BOm galera, eu tenho um menu,

 

ele é um menu daquele q quando vc passar o mouse ele aparece, (desculpem eu esqueci o nome) '-'

 

mais enfim, coloquei o link, porém o link esta aparecendo em outras paginas e quando tiro o link as paginas ficam normais, enfim, eu acho que é o css, tem como vc's verem??

 

vou postar o codigo do CSS, e a pagina com o link

 

CSS:

*{
margin: 0px;
padding: 0px;
}
body{
background-color: #FFF;
}

/*Configuração do topo */

header{
width: 100%;
height: 145px;
float: left;
background-color: #5ba452;
}

header #topo{
width: 1120px;
height: 155px;
margin: 0 auto;
}

#logo{
width: 231px;
height: 53px;
float: left;
margin-top: 10px;
}

#topo-right{
    width: 455px;
    height: 144px;
    float: right;
}


#topo-right p{
width: 455px;
margin-top: 25px;
margin-bottom: 20px;
font-family: Tahoma;
color: #FFF;
font-size: 14px;
text-align: right;
}

#topo-right p a{
    color:  #073e00;
    text-decoration: none;
}

#topo-right #busca-organica{
    width: 400px;
    height: 40px;
    border: none;
    background: #fff;
    float: right;
    box-shadow: inset 0px 0px 5px 1px #cfcdcd;
    font-family: Tahoma;
    font-size: 16px;
    color: #073e00;
    text-align: right;
    padding: 0px 10px 0px 10px;
}
     

/* Configurações do Menu */

#menu{
    width: 100%;
    height: 50px;
    float: left;
    background-color: #0e7501;
        
}

#menu nav{
    width: 1120px;
    height: 50px;
    margin: 0 auto;
}

nav ul#menu-screen{
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul#menu-screen li{
    width: auto;
    height: 90px;
    display: inline;
    padding: 15px 15px 16px 15px;
    text-align: center;
    float: left;
    margin-right: 7px;
    font-family: Tahoma;
    font-size: 16px;
    color: #FFF;
        
    }
    
    nav a{
        color: #0e7501;
        text-decoration: none;
        
          
    }
    
     ul#menu-screen li ul li:hover a{
        color: #FFF;
        text-decoration: none
    }
    
    ul#menu-screen li a:hover {
        color: #FFF;
        text-decoration: none
    }
    
    
    
    nav ul#menu-screen li:first-child{
        width: 130px;
        height: 19px;
    }
    nav ul#menu-screen li:hover{
        background-color: #fff;
        color: #0e7501;
        cursor: pointer;
    }
    nav ul#menu-screen li ul{
        display: none;
    }
    
    nav ul#menu-screen li:hover ul{
        display: block;
        ;
        margin-top: 16px;
        width: 1080px;
        height: auto;
        padding: 20px;
        float: left;
        background-color: #fff;
        box-shadow: 0px 3px 4px 1px #ccc;
        border-radius: 0px 0px 4px 4px;
        position: relative;
        z-index: 3;
        
           
    }
    
    nav ul#menu-screen li:hover ul li{
    width: auto;
    height: auto;
    color: #121212;
    display: block;
    padding: 0px;
    margin-right: 10px;
    padding: 5px;
    border-radius: 2px;
    
        
}

nav ul#menu-screen li:hover ul li:hover{
   background-color: #0e7501;
    color: #fff;
    
        
}

/* Configuração do Conteúdo */

main{
    width: 100%;
    height: auto;
    float: left;
    position: relative;
    z-index: 1;
    margin-bottom: 30px;
}

section#content{
    width: 1120px;
    height: auto;
    margin: 0 auto;
    }
    
    section#conteudo{
        width: 700px;
        height: auto;
        float: left;
    }
    
    section.banner{
        width: 690px;
        height: 270px;
        float: left;
        margin-top: 20px;
            
    }
    
    section.banner ul li a img{
        max-width: 690px;
        max-height: 270px;
        min-width: 690px;
        min-height: 270px;
    }
    
    section#artigos{
        width: 700px;
        height: auto;
        float: left;
        margin-top: 20px;
    }
    
    section#artigos article{
        width: 218px;
        height: 270px;
        float: left;
        font-family: Tahoma;
        color: #0e7501;
        margin-left: 12px;
        margin-bottom: 15px;
        
    }
    
    section#artigos article h1{
        width: 218px;
        height: auto;
        float: left;
        font-size: 18px;
        text-align: left;
        padding: 0;
        
    }
    
    section#artigos article h1 a{
        color: #000000;
        text-decoration: none
        
    }
    
    section#artigos article img{
        width: 210px;
        height: 160px;
        float: left;
        margin-top: 5px;
       
    }
    
    section#artigos article h2{
        width: 218px;
        height: 55px;
        float: left;
        font-size: 14px;
        text-align: center;
        padding: 0;
    }
    
    section#artigos article h2 a{
      color: #000000;
      text-decoration: none  
    }
    
    section#publicidade-conteudo{
        width: 700px;
        height: 90px;
        float: left;
        margin-top: 10px;
        background-color: #ccc
        
    }
    
    /* Configuração da Sidebar */
    
    section#sidebar{
        width: 400px;
        height: auto;
        margin-top: 20px;
        float: right;
       
    }
    
    section#publicidade-sidebar{
        width: 400px;
        height: 250px;
        float: right;
        background: #ddd;
        margin-bottom: 15px;
    }
    
    section#widget-ultimas-noticias, section#widget-categorias-portal{
        width: 400px;
        height: auto;
        float: right;
        font-family: Tahoma;
        font-size: 14px;
        
    }
    
    section#widget-categorias-portal{
        margin-top: 15px;
    }
    
    section#widget-ultimas-noticias h1, #widget-categorias-portal h1{
        font-size: 16px;
        background-color: #0e7501;
        color: #fff;
        padding: 7px 12px 7px 12px;
        width: 376px;
        height: auto;
        float: right;
        border-radius: 2px;
        position: relative;
        z-index: 2;
    }
    
    section#widget-ultimas-noticias ul, #widget-categorias-portal ul{
        list-style: none;
        margin: 0;
        padding: 0;
        height: auto;
        float: right;
        margin-top: 5px;
    }
    
    #widget-categorias-portal ul{
        display: inline
    }
    
    section#widget-ultimas-noticias ul li, #widget-categorias-portal ul li{
        color: #5ba452;
        width: 386px;
        height: auto;
        padding: 5px 7px 5px 7px;
        float: right;
        -webkit-transition: all 0.3s ease-in-out;
        -moz-transition: all 0.3s ease-in-out;
        -o-transition: all 0.3s ease-in-out
    }
    
    section#widget-ultimas-noticias ul li a, #widget-categorias-portal ul li a {
         color: #000000;
        text-decoration: none;
        
    }
    
    section#widget-ultimas-noticias ul li:hover a, #widget-categorias-portal ul li:hover a{
        color: #FFF;
        text-decoration: none;
    }
    
    #widget-categorias-portal ul li{
        width: auto;
        height: auto;
        padding: 7px 5px 7px 5px;
        float: right;
       
    }
    
    
    
    section#widget-ultimas-noticias ul li:hover, #widget-categorias-portal ul li:hover{
        background-color: #0e7501;
        color: #fff;
        cursor: pointer;
            
    }
    
    /* Configuração Noticias Interna */

section#banner-noticia{
	width: 690px;
	height: 270px;
	float: left;
	margin-top: 10px;
	overflow: hidden;
}

section#banner-noticia img{
	width: 690px;
	height: 270px;
}

section#info-noticias{
	margin-top: 20px;
	float: left;
	text-align: left;
}

section#info-noticias h1{
	width: 679px;
	height: auto;
	text-align: left;
	padding: 0;
	margin: 0;
	margin-bottom: 5px;
}

section#conteudo-noticia{
	width: 690px;
	height: auto;
	margin-top: 20px;
	float: left;
	text-align: justify;
}

section#tags{
	width: 670px;
	height: auto;
	float: left;
	background-color: #E2E2E2;
	color: #121212;
	padding: 10px;
	margin-top: 10px;
	text-align: left;
	border: 2px dashed #BBBBBB;
}

/*Configuração página de Categoria */

section#categoria-news, section#categoria-news-error{
	width: 650px;
	height: auto;
	float: left;
	margin-top: 20px;
	padding-bottom: 10px;
}

section#categoria-news h1, section#categoria-news-error h1{
	width: 100%;
	height: auto;
	text-align:left;
	font-size: 20px;
	font-family: Tahoma;
	padding: 10px 0px;
	border-bottom: 1px solid #BCBCBC;
	margin-bottom: 10px;
}

section#categoria-news-error h1{
	border: none;
	font-size: 24px;
}

section#categoria-news h1 a{
	color: #121212;
	text-decoration: none;
}

section#imagem-noticia{
	width: 160px;
	height: 160px;
	float: left;
	border: 5px solid #fff;
	box-shadow: 0px 0px 2px 1px #999999;
	margin-right: 20px;
	margin-bottom: 3px;
	margin-top: 8px;
	overflow: hidden;
}

section#imagem-noticia img{
	width: 160px;
	height: 100%;
	float: left;
}

section#categoria-news p{
	text-align: justify;
	font-size: 14px;
	font-family: Tahoma;
	color: #121212;
}

section#categoria-news p a{
	color: #1C4788;
	text-decoration: none;
}
    
    /* Configuração do Footer */
    
    footer{
        width: 100%;
        height: auto;
        float: left;
        margin-bottom: 20px;
        background: #5ba452
        
    }
    
    footer #center-ft{
        width: 1120px;
        height: auto;
        float: center;
        margin: 0 auto;
        border-top: 2px solid #75b66c
    }
    
    footer #logo2{
        float: left;
        margin-top: 20px;
    }
    
    footer #center-ft p{
        font-family: Tahoma;
        font-size: 14px;
        color: #fff;
        float: right;
        margin-top: 25px;
    }
  

agora da pagina do menu:

<?php require_once "configuration.php"; ?> 

<!DOCTYPE html>
<html lang="py-br">
    <head>
       <meta charset="utf-8" />
        <title>Esportes Geral</title>
        <link rel="stylesheet" type="text/css" href="css/categoria.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="css/noticia.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="css/default.css" media="screen" />
        <script src="js/jquery-2.1.4.js" type="text/javascript"></script>
        <script type="text/javascript" src="js/easySlider1.7.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){	
			$("#slider").easySlider({
				auto: true, 
				continuous: true
			});
		});	
	</script>
	
<link href="css/screen.css" rel="stylesheet" type="text/css" media="screen" />
        
    </head>
        
    <body>    
    
        <header>
                     
            <div id="topo">
                
                <div id="logo">
                    <a href="index.php">
                    <img src="imagens/Logo.png"  alt="Esportes Geral Logo" />
                    </a>
                </div>

                     <div id="topo-right">
                    
                    <p>Olá, Seja Bem Vindo <a href="paineldecontrole/index.php">Faça login</a> ou <a href="cadastrar.php">Cadastre-se</a>. </p>
                    
                    <form action="busca.php" method="GET">
                        
                        <input type="text" name="busca-organica" id="busca-organica" />
                        
                        <p><embed quality="high" src="http://www.cryd.com.br/relogios-feitos-em-flash/swf/01-10/481.swf" type="application/x-shockwave-flash" width="300" height="20" wmode="transparent"></embed></p>
                    </form>
                </div>
            
                   
            </div>
            
            
        </header>
        
        <div id="menu">
            
            <nav>
                <ul id="menu-screen">
                    
                   <li>Categorias do site
                    <ul>
                        <?php
                           
                        $SQL = mysql_query("SELECT * FROM categoria");
                        
                        while($ln = mysql_fetch_assoc($SQL)){
                         
                            
                          ?>
                        <li><a href="categoria.php?id=<?php echo $ln["id_categoria"]; ?>"/><?php echo $ln["nome_categoria"]; ?></li>
                        <?php } ?>
                    </ul>
                        </li>
                    <li>Publicidade</li>
                    <li>Quem somos</li>
                    <li>Parceiros</li>
                    <li>atendimento</li>
                </ul>
            </nav>
            
        </div>

estou com o problema nesse link:

<li><a href="categoria.php?id=<?php echo $ln["id_categoria"]; ?>"/><?php echo $ln["nome_categoria"]; ?></li>

Compartilhar este post


Link para o post
Compartilhar em outros sites

troca:

 

 

<li><a href="categoria.php?id=<?php echo $ln["id_categoria"]; ?>"/><?php echo $ln["nome_categoria"]; ?></li>
por
<li><a href="categoria.php?id=<?php echo $ln["id_categoria"]; ?>"><?php echo $ln["nome_categoria"]; ?></a></li>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Muito Obrigado Bruno, Nem percebi que não fechei o <a> '-'

 

troca:

<li><a href="categoria.php?id=<?php echo $ln["id_categoria"]; ?>"/><?php echo $ln["nome_categoria"]; ?></li>
por
<li><a href="categoria.php?id=<?php echo $ln["id_categoria"]; ?>"><?php echo $ln["nome_categoria"]; ?></a></li>

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

  • Conteúdo Similar

    • Por daemon
      Boa tarde,
       
      Eu tenho uma rotina que faz uma leitura do arquivo .xml de vários sites.

      Eu consigo pegar o tópico e a descrição, e mostrar a imagem que esta na pagina do link.
      Para isso utilizo esta função:
      function getPreviewImage($url) { // Obter o conteúdo da página $html = file_get_contents($url); // Criar um novo objeto DOMDocument $doc = new DOMDocument(); @$doc->loadHTML($html); // Procurar pela tag meta og:image $tags = $doc->getElementsByTagName('meta'); foreach ($tags as $tag) { if ($tag->getAttribute('property') == 'og:image') { return $tag->getAttribute('content'); } } // Se não encontrar og:image, procurar pela primeira imagem na página $tags = $doc->getElementsByTagName('img'); if ($tags->length > 0) { return $tags->item(0)->getAttribute('src'); } // Se não encontrar nenhuma imagem, retornar null return null; } // Uso: $url = "https://example.com/article"; $imageUrl = getPreviewImage($url); if ($imageUrl) { echo "<img src='$imageUrl' alt='Preview'>"; } else { echo "Nenhuma imagem encontrada"; }  
      Mas estou com um problema, esta funcão funciona quando coloco em uma pagina de teste.php. Preciso mostrar em uma página inicial diversas fotos de todos os links. (No caso acima só funciona 1).
    • Por violin101
      Caros amigos, saudações.
       
      Por favor, me permita tirar uma dúvida com os amigos.

      Tenho um Formulário onde o Usuário digita todos os Dados necessários.

      Minha dúvida:
      --> como faço após o usuário digitar os dados e salvar, o Sistema chamar uma Modal ou mensagem perguntando se deseja imprimir agora ?

      Grato,
       
      Cesar
    • Por Carcleo
      Tenho uma abela de usuarios e uma tabela de administradores e clientes.
      Gostaria de uma ajuda para implementar um cadastro
       
      users -> name, login, passord (pronta) admins -> user_id, registratiom, etc.. client -> user_id, registratiom, etc...
      Queria ajuda para extender de user as classes Admin e Client
      Olhem como estáAdmin
      <?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Admin extends User {     use HasFactory;            protected $fillable = [         'name',         'email',         'password',         'registration'     ];      private string $registration;     public function create(         string $name,          string $email,          string $password,         string $registration     )     {         //parent::create(['name'=>$name, 'email'=>$email, 'password'=>$password]);         parent::$name = $name;         parent::$email = $email;         parent::$password = $password;         $this->registration = $registration;     } } User
      <?php namespace App\Models; // use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Illuminate\Database\Eloquent\Relations\BelongsToMany; class User extends Authenticatable {     /** @use HasFactory<\Database\Factories\UserFactory> */     use HasFactory, Notifiable;     static string $name;     static string $email;     static string $password;     /**      * The attributes that are mass assignable.      *      * @var list<string>      */     protected $fillable = [         'name',         'email',         'password',     ];          /**      * The attributes that should be hidden for serialization.      *      * @var list<string>      */     protected $hidden = [         'remember_token',     ];     /**      * Get the attributes that should be cast.      *      * @return array<string, string>      */     protected function casts(): array     {         return [             'email_verified_at' => 'datetime',             'password' => 'hashed',         ];     }          public function roles() : BelongsToMany {         return $this->belongsToMany(Role::class);     }       public function hasHole(Array $roleName): bool     {                 foreach ($this->roles as $role) {             if ($role->name === $roleName) {                 return true;             }         }         return false;     }         public function hasHoles(Array $rolesName): bool     {                 foreach ($this->roles as $role) {             foreach ($rolesName as $rolee) {             if ($role->name === $rolee) {                 return true;             }          }         }         return false;     }         public function hasAbility(string $ability): bool     {         foreach ($this->roles as $role) {             if ($role->abilities->contains('name', $ability)) {                 return true;             }         }         return false;     }     } Como gravar um Admin na tabela admins sendo que ele é um User por extensão?
      Tentei assim mas é claro que está errado...
      public function store(Request $request, Admin $adminModel) {         $dados = $request->validate([             "name" => "required",             "email" => "required|email",             "password" => "required",             "registration" => "required"         ]);         $dados["password"] =  Hash::make($dados["password"]);                  $admin = Admin::where("registration",  $dados["registration"])->first();                  if ($admin)              return                    redirect()->route("admin.new")                             ->withErrors([                                 'fail' => 'Administrador já cadastrados<br>, favor verificar!'                   ]);                            $newAdmin = $adminModel->create(                                    $dados['name'],                                    $dados['email'],                                    $dados['password'],                                    $dados['registration']                                 );         dd($newAdmin);         $adminModel->save();         //$adminModel::create($admin);                  return redirect()->route("admin.new")->with("success",'Cadastrado com sucesso');     }  
    • Por ILR master
      Fala pessoal, tudo bem?
       
      Eu tenho o seguinte código:
       
      <script>
         $(function(){
      var jElement = $('.fixar_banner');
      $(window).scroll(function(){
          if ( $(this).scrollTop() > 120 ){
              jElement.css({
                  'position':'fixed',
                  'top':'10px'
              });
          }else{
              jElement.css({
                  'position':'relative',
                  'top':'auto'
              });
          }
      });
      });
      </script>
       
      Porém, eu quero que a div fique fixa até que outro elemento apareça na tela, tipo o rodapé da página por exemplo. É mais ou menos como a página de notícia do uol.
      https://noticias.uol.com.br/internacional/ultimas-noticias/2025/01/19/sonho-americano-brasileiros-moram-em-carro-e-buscam-comida-no-lixo-nos-eua.htm
       
      Espero ter sido claro.
       
      Obrigado :)
       
    • Por violin101
      Caros amigos, saudações.
       
      Gostaria de tirar uma dúvida com os amigos, referente a PDV.
       
      Estou escrevendo um Sistema com Ponto de Vendas, a minha dúvida é o seguinte, referente ao procedimento mais correto.

      Conforme o caixa vai efetuando a venda, o Sistema de PDV já realiza:
      a baixa direto dos produtos no estoque
      ou
      somente após concretizar a venda o sistema baixa os produtos do estoque ?
       
      Grato,
       
      Cesar
       
×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.