2
The code below relates to menu and footer, whose I’m having trouble adjusting to responsive layout:
/*Código por Domingos Pereira, GPSI12 */
/*Dísciplina de Redes */
/* Professor: João Delgado */
/*
Menu
*/
#menu{
text-align:center;
width:750px;
margin:0 auto;
white-space: nowrap;
display: block;
}
#menu > ul > li.active > a {
color: #FFFFFF;
}
#menu ul ul li.active > a {
color: #FFFFFF;
}
#menu ul {
padding:0px;
margin:0px;
float: left;
width: 49,5%;
background-color:#EDEDED;
list-style:none;
font:80% Tahoma;
}
#menu ul li {
display: inline;
}
#menu ul li a {
display:block;
text-align:center;
background-color:#EDEDED;
color: #333;
text-decoration: none;
border-bottom:3px solid #EDEDED;
padding: 2px 10px;
float:left;
}
#menu ul li a:hover {
background-color:#D6D6D6;
color: #6D6D6D;
border-bottom:3px solid #565656;
}
/* Termina Menu*/
/* Footer */
footer {
position: relative;
z-index: 1;
background: #e9e9e9;
margin-top: -28px;
padding: 48px 0 28px 0;
}
/* Termina Footer */
/* Imagens*/
/* codigo extra, caso necessário */
/*<img class="responsive" src="http://fotopex.com/42.jpg" />*/
/*img.responsive {
border-radius: 3px;
box-shadow: 0 3px 6px rgba(0,0,0,0.9);
margin: 2.5% ;
}
@media screen and (orientation: portrait) {
img.responsive { max-width: 95%; }
}
@media screen and (orientation: landscape) {
img.responsive { max-height: 95%; } */
/* Fim codigo extra, caso necessário */
#logo{
margin-left:10%;
}
/* IFRAMES / SLIDE*/
iframe{
width:100%;
height:100%;
allowfullscreen:true;
border:none;
mozallowfullscreen:true;
webkitallowfullscreen:true;
}
.wrapperr {
max-width: 65.33333333333333em;
margin: 0 auto;
}
.wrapper {
width:100%;
height:100%;
margin:0 auto;
background:#ffffff;
}
.h_iframe {position:relative;}
.h_iframe .ratio {display:block;width:100%;height:auto;}
.h_iframe iframe {position:absolute;top:0;left:0;width:100%; height:100%;}
/* Fim Imagens */
/* Formatação da página */
html, body {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
height: 98%;
background-color:#f9f9f9;
}
#divsec {
max-width:100%;
max-height:100%;
position:relative;
height: 70%;
width:60%;
margin:0 auto;
text-align:center;
}
#divinicio {
max-width:100%;
max-height:100%;
position:relative;
height: 65%;
width:60%;
border:1px solid #000000;
margin:0 auto;
margin-top:4%;
text-align:center;
}
.container {
padding: 3em 0;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
margin-right: auto;
margin-left: auto;
}
/* Fim formatação da página */
/* Tabela Software */
table {
position:relative;
margin-left:0;
margin-right:0;
margin-top:1%;
border-collapse: collapse;
border: 1px solid #666666;
font: normal 11px verdana, arial, helvetica, sans-serif;
color: #363636;
background: #f6f6f6;
text-align:left;
display:block;
width:auto;
overflow-x: auto;
}
caption {
text-align: center;
font: bold 16px arial, helvetica, sans-serif;
background: transparent;
padding:6px 4px 8px 0px;
color: #CC00FF;
text-transform: uppercase;
}
thead, tfoot {
background:url(bg1.png) repeat-x;
text-align:left;
height:30px;
}
thead th, tfoot th {
padding:5px;
}
table a {
color: #333333;
text-decoration:none;
}
table a:hover {
text-decoration:underline;
}
tr.odd {
background: #f1f1f1;
}
tbody th, tbody td {
padding:5px;
}
hr{
height:2px;
border:1px;
color:#000;
background-color:#000;
margin-top: 0px;
margin-bottom: 0px;
}
/* Fim tabela software */
<!DOCTYPE html>
<html>
<head>
<title>1CCEPB</title>
<link rel="icon" href="img/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="css/style.css" type="text/css">
<script type="text/javascript" src="js/script.js"> </script>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Escola Profissional de Braga, EPB,Math,Matemática,Imagem da Matemática" />
</head>
<body>
<!-- Logotipo -->
<header>
<div id="logo">
<a href="index.html"><img src="img/logo_epb.png" alt="EPB" /></a>
</div>
</header>
<!-- FimLogotipo -->
<!-- Menu Principal -->
<div class="clear"></div>
<nav>
<center>
<div id="menu">
<ul>
<li><a href='index.html'>Inicio</a></li>
<li><a href="galeria.html">Galeria </a> </li>
<li><a href="evento.html">Eventos</a></li>
<li><a href="math.html">Matemática</a></li>
<li><a href="fq.html">FQ</a></li>
<li class='active'><a href="software.html">Software</a></li>
</ul>
</div>
</center>
</nav>
<br>
<br>
<br>
<!-- Fim Menu Principal -->
<!-- DIV Software -->
<div id="divsec">
<!--Tabela software -->
<center>
<table width=500>
<thead>
<tr>
<th scope="col">Software</th><th scope="col">Descrição</th><th scope="col">Download</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row" id="Graph">
<hr/>
<p>Graph 4.4.2</p>
</th>
<td>
<br>
<p>Programa que desenha o gráfico de uma função e informa sobre algumas das suas caracteristicas.</p>
</td>
<td>
<a href="/software/graph.exe" title="Graph 4.4.2">Download</a>
</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="row" id="Graph">
<hr/>
<p>FX-9860G Emulator</p>
</th>
<td>
<p>Programa que emula a calculadora gráfica Casio FX - 9860G SD</p>
</td>
<td>
<a href="/software/fx-9869-emulator.exe" title="FX-9860G Emulator">Download</a>
</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="row" id="Graph">
<hr/>
<p>Função Trignométrica</p>
</th>
<td>
<p>Associação entre o círculo trigonométrico e os gráficos das funções trignoméricas no intervalo [0 , 2PI]</p>
</td>
<td>
<a href="/software/fx-9869-emulator.exe" title="Função Trignométrica">Download</a>
</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="row" id="Graph">
<hr/>
<p>Círculo Trignométrico</p>
</th>
<td>
<p>Programa que permite a introdução do círculo trigonométrico.</p>
</td>
<td>
<a href="/software/fx-9869-emulator.exe" title="Graph">Download</a>
</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="row" id="Graph">
<hr/>
<p>Poly32</p>
</th>
<td>
<p>Programa que permite reconhecer e analisar algumas propriedades dos sólidos platónicos.</p>
</td>
<td>
<a href="/software/fx-9869-emulator.exe" title="Graph">Download</a>
</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="row" id="Graph">
<hr/>
<p>GeoGebra</p>
</th>
<td>
<br>
<p>Software de matemática dinâmica para utilizar em ambiente de sala de aula, que reune geometria, álgebra e cálculo.</p>
</td>
<td>
<a href="/software/fx-9869-emulator.exe" title="GeoGebra">Download</a>
</td>
</tr>
</tbody>
</table>
</center>
<!-- Fim Tabela software -->
</div>
<!-- Fim DIV centrada -->
<!-- Copy rights-->
<footer>
<p align="center">Copyright © 2015 All rights reserved | <b> Domingos Manuel Gavina Pereira</b></p>
</footer>
<!-- Fim Copy rights-->
</body>
</html>
When the viewport is resized, the menu is not responsive and the footer "goes up" and is centralized, even using bottom: 0
.
How can I solve this problem using only HTML and CSS?
Celsom, maybe it would be better if you took your doubts before elaborating your answer to avoid unnecessary content in response, for this and to inform something to the user use the comment fields. Another point I would also like to comment on is the following "For each case we use a different approach, with a different ideal programming language", only javascript can be considered programming language in this case, where HTML is markup language and CSS relates to "stylesheet" in some cases also called formatting language :)
– Rafael Kendrik
Yeah, maybe the way you expressed yourself to me was wrong. But it was not the kind of question waiting for an answer, but rather to answer both in the body of the text. Because I sought to answer both questions, how to make only the change/function in css and what should you do if you look for the functionality in JS.
– celsomtrindade
I understand, but honestly, "Do you need to just adjust the layout?" sounds like a question waiting for an answer. Understand Celsom, I’m not pointing out as a negative criticism, maybe you could use this text snippet without using questions as something like this "in case you need to just adjust the layout and need it to stay with the "burger menu"and that by clicking it expands the options, you can do...", so you can avoid there being "doubts" regarding the reason for the questions...
– Rafael Kendrik
Yes yes, I understand your point, and I intend just that, improve the explanation. I’m just not on the pc right now to do it more easily. But I will reread and elaborate better. I took as constructive yes =D
– celsomtrindade
@Dorivalzanetto really, reading calmly now, had gotten a little confused the explanation, I think now improved =D Thanks for the tip
– celsomtrindade