I am going to open this up again because something funny is now happening with this styling.
The area of the page these images are in won't actually contain them.
Meaning, I tried to put a background or border color to the area of the page they are in, and the area shows up as being "0" pixels tall, instead of being the height of a container that holds all the images.
CSS:
Code:
#project-menu-area {
position: relative;
width: 1180px;
margin: 0 auto;
background-color:#069;
border: 1px dashed #ccc;
}
.project-image {
float: left;
padding: 7px;
border: 1px dashed #ccc;
margin: 16px 8px 0;
color: #8e8c96;
}
.project-image p {
margin-top: -5px;
text-align: right;
font-style: italic;
text-indent: 0;
font-weight:700;
margin-bottom: 5px;
}
.project-image:hover {
padding: 7px;
border: 1px solid #ee3824;
margin: 16px 8px 0;
color: #ee3824;
background: #fff;
}
If the HTML is like this, no background or border color shows of the "project-menu-area" area because the area looks to be "0" pixels tall:
Code:
<div id="project-menu-area">
<div class="project-image">
<a href="link1.html"><img src="photo1.jpg" alt="photo name 1" width="200" height="100"></a>
<p>caption</p>
</div>
<div class="project-image">
<a href="link2.html"><img src="photo2.jpg" alt="photo name 2" width="200" height="100"></a>
<p>caption</p>
</div>
<div class="project-image">
<a href="link3.html"><img src="photo3.jpg" alt="photo name 3" width="200" height="100"></a>
<p>caption</p>
</div>
<div class="project-image">
<a href="link4.html"><img src="photo4.jpg" alt="photo name 4" width="200" height="100"></a>
<p>caption</p>
</div>
</div>
HOWEVER, if the HTML is like this, without the "div class" styling for the images/links, then the background color and border color of the "project-menu-area" show, because the area looks to be the height of the zone behind all these images:
Code:
<div id="project-menu-area">
<a href="link1.html"><img src="photo1.jpg" alt="photo name 1" width="200" height="100"></a>
<a href="link2.html"><img src="photo2.jpg" alt="photo name 2" width="200" height="100"></a>
<a href="link3.html"><img src="photo3.jpg" alt="photo name 3" width="200" height="100"></a>
<a href="link4.html"><img src="photo4.jpg" alt="photo name 4" width="200" height="100"></a>
</div>
It's really weird...
AND, I should mention, even thought the border and background color of the "project-menu-area" don't show, the width and auto margin styles are recognized and work.
Thanks!
Bookmarks