Struggling to fit the image student.jpg
within a DIV.
The condition is that galleryWrap
should be inside logOuterWrap
. The goal is to place student.jpg
inside galleryWrap
.
Using jQuery:
galleryID++;
var logOuterWrap = $("<div/>",{class: "galleryBox", id: "main"+galleryID }).appendTo("#galleryContainer")
var galleryWrap = $("<div/>",{class: "galleryInner", id: "gallery"+galleryID }).appendTo(logOuterWrap)
galleryWrap.append(
$("#gallery"+galleryID).html("<img src='img/student.jpg'/>"),"<br />");
CSS:
#galleryContainer{
width: 100%;
height: 100%;
background-color: #fff;
}
.galleryBox{
background-color: #00ff00;
width: 75px;
height: 75px;
}