Logo Fixed CSS

Asked

Viewed 123 times

0

I wanted to leave my logo fixed only when the site is open on small screen or large screen and fits to ex size: inserir a descrição da imagem aqui

Tela Pequena: inserir a descrição da imagem aqui

Menu HTML and CSS:

#navtoplist {
    padding: 0px;
    width: 100%;
    margin-left: 389px;
    margin-top:-60px;
    background: transparent;
    voice-family: "\"}\"";
    voice-family: inherit;
}

#navtoplist ul {
    font-family: 'Poiret One', cursive;
    margin: 0;
    margin-left: 14px;
    padding: 0;
    list-style: none;
}

#navtoplist li {
    display: inline;
    margin: 0 2px 0 0;
    padding: 0;
}

#navtoplist a, #navtoplist a:link, #navtoplist a:visited {
    float: left;
    display: block;
    color: #fff;
    margin: 0 6px 0 0;
    padding: 5px 10px;
    text-decoration: none;
    letter-spacing: 2px;
    border-radius: 4px;
    height: 28px;
    background: #000066 ;
}

#navtoplist a:hover{
    background: #99CCFF ;
}

#navtoplist #current a {
    background: #E7E7E7 url(../images/button_current.png) repeat-x; 
    border-color: #E7E7E7;
}

#navtoplistline {
    clear: both;
    padding: 0;
    width: 100%;
    height: 1px;
    line-height: 5px;
    background: #dcdcdc ;
    margin-top: -7px;
    margin-bottom: 0px; 
}

/***** NAVIGATION MAIN *****/

#navmainlist {
    padding: 0;
    margin: 0 0 0 0;
    width: 200px;
}

#navmainlist li {
    list-style: none;
    margin: 0;
    line-height: 2em;
}

#navmainlist li a,#navmainlist li a:link,#navmainlist li a:visited {
    font-weight: normal;
    width: 100%;
    background-color: #e7e7e7;
    display: block;
    outline: none;
    text-decoration: none; 
    text-indent: 10px;
}

#navmainlist li a:hover {
    color: #669933;
    background-color: #fff;
    text-decoration: none; 
}

#navmainlistline {
    clear: both;
    padding:0;
    width: 100%;
    height: 2px;
    line-height: 2px;
    background: #ccc;
    margin: 2px 0 15px 0; 
}

/***** NAVIGATION WEBLINKS *****/

#weblinks li
{
    font-size: 90%;
    list-style: none;
    margin-left: 5px;
}

#weblinks a, #weblinks a:link, #weblinks a:visited
{
    color: #999;
}

#weblinks a:hover
{
    color: #ccc;
}
<div id="navtoplist">
<?


// Si estan definidas las variables de las cookies se procede a mostrar el menu pero no sin antes comprobar que los
// datos de las cookies verdaderamete son del usuario en cuestion.

if(isset($_COOKIE["usNick"]) && isset($_COOKIE["usPass"]))
{

// Se incluyen los archivos necesarios




// Se sanitizan los datos de las cokies

$user=uc($_COOKIE["usNick"]);

// Se selecciona la tabla tb_users donde el usuario es el que se provee en la cookie
require('config.php');
$sql = "SELECT * FROM tb_users WHERE username='$user'";
$result = mysql_query($sql);        
$row = mysql_fetch_array($result);
mysql_close($con);
// Se sanitiza de nuevo la cookie

$wask = uc($_COOKIE["usNick"]);

// Se define $wesk como el nombre de usuario de la tabla tb_users

$wesk = $row['username'];

// Se comprueba que el dato de la cookie sea el mismo que el de la tabla, de lo contrario se muestra error, se termina
// el script y se borra la cookie.

if("$wesk" != "$wask") {
echo "Login incorreto.";
?>
<input type="button" value="Reload Page" onClick="window.location.reload()">
<?
exit();
}

// Se sanitiza la cookie usPass

$wazk = uc($_COOKIE["usPass"]);

// Se define $wezk como el nombre de usuario de la tabla tb_users

$wezk = $row['password'];

// Se comprueba que el dato de la cookie sea el mismo que el de la tabla, de lo contrario se muestra error, se termina
// el script y se borra la cookie.

if("$wezk" != "$wazk") {
echo "Login incorreto.";
?>
<input type="button" value="Reload Page" onClick="window.location.reload()">
<?
exit();
}

echo"
            <ul>

                <li><a href=\"index.php\">Inicio</a></li>
                <li id=\"current\"><a href=\"surf.php\">Anuncios</a></li>";
// ver si es admicrostrador
require('config.php');
$sql = "SELECT * FROM tb_users WHERE username='$user'";
$result = mysql_query($sql);        
$row = mysql_fetch_array($result);
mysql_close($con);
$admicrostrator = $row['user_status'];

        if($admicrostrator == "admin") {

                echo "<li><a href=\"admin/\" target=\"_blank\">Admin</a></li>";
                                        }
echo"
                <li><a href=\"members.php\">Minha Conta</a></li>
                <li><a href=\"advertise2.php\">Anuncie</a></li>
                <li><a href=\"contact.php\">Contato</a></li>
                <li><a href=\"forum\" target=\"_blank\">Fórum</a></li>
                <li><a href=\"logout.php\">Sair</a></li>
            </ul>";


}
else
{

// funcion para sanitizar variables



echo "
            <ul>
                <li><a href=\"index.php?r=".$elref."\">Inicio</a></li>
                <li id=\"current\"><a href=\"surf.php?r=".$elref."\">Anuncios</a></li>
                <li><a href=\"login.php?r=".$elref."\">Login</a></li>
                <li><a href=\"register.php?r=".$elref."\">Registro</a></li>
                <li><a href=\"faq.php?r=".$elref."\">FAQ</a></li>
                <li><a href=\"advertise2.php?r=".$elref."\">Anuncie</a></li>
                <li><a href=\"forum".$elref."\" target=\"_blank\">Fórum</a></li>
                <li><a href=\"contact.php?r=".$elref."\">Contato</a></li>

              </ul>
";
}

?>

</div>

  • 1

    To get a good answer, you’d better post at least the basics of the code you’re currently using. You can click on [Edit] below the question and add details. Anyway, click here and see if any of the answers help. - com media queries you can use different CSS settings depending on the screen size

  • Ready I edited, but the code has nothing more.

  • 1

    Also post HTML and CSS from the entire menu.

  • Your code is difficult to read, you are in doubt regarding the alignment of the logo and I did not find anything related to it in the code you put here. It would be better if you isolated only the code related to the logo and the elements that affect it.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.