Menu
Hi All
I have a test site at: [URL=”http://purple-mouse.co.uk/test/”]http://purple-mouse.co.uk/test/
Does anyone know why the img container shows the background under the image?
I can live with it but would love to know how to control it.
thanks
Mandy
I'm not sure I understand your problem (can't see the connection between your topic title and the question in your post). So I guess I'll have to ask some clarification questions.
What is it exactly that you are wanting to happen?[/QUOTE]
[code=html]
#navMenu img { margin-bottom: -3px; }
[/code]
You can always try something like
[code=html]
#navMenu img { margin-bottom: -3px; }
[/code]
But that's more of a hack than anything. I do hate to offer a 'quick fix', but maybe after work I can take another look and pinpoint where the extra space is coming from.[/QUOTE]
[color=navy]
img {[color=red]
display:block;[/color]
width:100%;
border: 0;
}[/color]
[color=navy] Neither work - and I checked out the further reading too.[/color] [/quote]
[color=navy]
<!DOCTYPE html>
<html lang="en">
<head>
<base href="http://purple-mouse.co.uk/test/">
<meta charset="utf-8">
<title>Testing Responsive Nav img test edit</title>
<style>
html, body,ul,ol,li,img,a {
margin:0;
padding:0;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
html {
overflow-y:scroll;
}
body{
background-color:#111;
color:#ccc;
}
img {[color=red]
display:block;[/color]
width:100%;
border:0;
}
#navMenu li {
list-style: none;
background: #111;
width:50%;
margin:0 25%;
}
#navMenu a:link ,#navMenu a:visited{
background: pink;
display:block;
text-decoration: none;
}
#navMenu a:hover {
background:#f00;
}
@media screen and (min-width: 500px) {
#container{
max-width:1000px;
margin:auto;
}
#navMenu li {
float: left;
width:16.66%;
margin:0 ;
}
}
</style>
</head>
<body>
<div id="container">
<div id="navMenu">
<ul>
<li><a href="1.php"><img src="home.png" alt="" /></a></li>
<li><a href="2.php"><img src="home.png" alt="" /></a></li>
<li><a href="3.php"><img src="home.png" alt="" /></a></li>
<li><a href="4.php"><img src="home.png" alt="" /></a></li>
<li><a href="5.php"><img src="home.png" alt="" /></a></li>
<li><a href="6.php"><img src="home.png" alt="" /></a></li>
</ul>
</div>
</div>
</body>
</html>[/color]
Hi there mandysutton,
[indent]
Do you actually believe that I would go to the trouble of giving you the
solution to, and "Further reading" about your problem if it did not work. ?
Here is the test code that I used...
[color=navy]
<!DOCTYPE html>
<html lang="en">
<head>
<base href="http://purple-mouse.co.uk/test/">
<meta charset="utf-8">
<title>Testing Responsive Nav img test edit</title>
<style>
html, body,ul,ol,li,img,a {
margin:0;
padding:0;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
html {
overflow-y:scroll;
}
body{
background-color:#111;
color:#ccc;
}
img {[color=red]
display:block;[/color]
width:100%;
border:0;
}
#navMenu li {
list-style: none;
background: #111;
width:50%;
margin:0 25%;
}
#navMenu a:link ,#navMenu a:visited{
background: pink;
display:block;
text-decoration: none;
}
#navMenu a:hover {
background:#f00;
}
@media screen and (min-width: 500px) {
#container{
max-width:1000px;
margin:auto;
}
#navMenu li {
float: left;
width:16.66%;
margin:0 ;
}
}
</style>
</head>
<body>
<div id="container">
<div id="navMenu">
<ul>
<li><a href="1.php"><img src="home.png" alt="" /></a></li>
<li><a href="2.php"><img src="home.png" alt="" /></a></li>
<li><a href="3.php"><img src="home.png" alt="" /></a></li>
<li><a href="4.php"><img src="home.png" alt="" /></a></li>
<li><a href="5.php"><img src="home.png" alt="" /></a></li>
<li><a href="6.php"><img src="home.png" alt="" /></a></li>
</ul>
</div>
</div>
</body>
</html>[/color]
[/indent]
[i]coothead[/i][/QUOTE]
0.1.9 — BETA 5.26