Windir19
10-26-2011, 05:34 PM
I have to make a book listing in the Ektron CMS where the image is displayed on the left with a title on the left with a link that (with Javascript) expands a div that contains the description with the book. The Javascript works but the CSS with the images included are funky.
http://i.imgur.com/5zRb7.jpg
Above is a drawn image of what I want.
http://i.imgur.com/rVul6.jpg
This is what I am getting.
I want the image to be contained with the text title and the [+] link. Incidentally the scheme works when expanded but not when it's collapsed.
Below is example code of what I am dealing with, I am pretty sure there is nothing wrong with the javascript but if there is a reason that you think it is just ask me for it. The "content" class is the div the javascript is meant to open up.
<style type="text/css">
{overflow: hidden !important;}
#booklist {
width: 450px;
}
#booklist img {
float: left;
position:relative;
height: 120px;
top:5px;
margin-top: 0;
padding: 5px;
}
#booklist h3
{
clear: both;
}
#booklist p, h3
{
margin-top: -2;
margin-left: 85px;
}
p.booktitle {
font-weight: bold;
margin-top: 0;
padding-top: 0;
}
div.item {
border-bottom:solid 1px #CDCDCD;
margin-bottom: 5px;
padding-bottom: 5px;
clear: both;
}
div.content {
clear: both;
text-align: justify;
}
div.title{
position:relative;
top:5px;
}
</style>
<h1>Learner Engagement Books</h1>
<h2>Bush Library Collection</h2>
<div id="booklist">
<div class="item"><img src="imgsrc"/>
<div class="title"><p class="booktitle">Advances in web-based education: personalized learning environments... </p><p><a id="header1" href="javascript: toggle2('content1','header1');">[+] Book Information</a>*</p>
</div>
<div id="content1" class="content" style="display: none; ">Description</div>
</div>
</div>
I have a work-around with tables but I know that is messy and usually undesirable so I wanted to ask some of the best if there is a better way. I have worked on this for days with two other guys that have some web design
http://i.imgur.com/5zRb7.jpg
Above is a drawn image of what I want.
http://i.imgur.com/rVul6.jpg
This is what I am getting.
I want the image to be contained with the text title and the [+] link. Incidentally the scheme works when expanded but not when it's collapsed.
Below is example code of what I am dealing with, I am pretty sure there is nothing wrong with the javascript but if there is a reason that you think it is just ask me for it. The "content" class is the div the javascript is meant to open up.
<style type="text/css">
{overflow: hidden !important;}
#booklist {
width: 450px;
}
#booklist img {
float: left;
position:relative;
height: 120px;
top:5px;
margin-top: 0;
padding: 5px;
}
#booklist h3
{
clear: both;
}
#booklist p, h3
{
margin-top: -2;
margin-left: 85px;
}
p.booktitle {
font-weight: bold;
margin-top: 0;
padding-top: 0;
}
div.item {
border-bottom:solid 1px #CDCDCD;
margin-bottom: 5px;
padding-bottom: 5px;
clear: both;
}
div.content {
clear: both;
text-align: justify;
}
div.title{
position:relative;
top:5px;
}
</style>
<h1>Learner Engagement Books</h1>
<h2>Bush Library Collection</h2>
<div id="booklist">
<div class="item"><img src="imgsrc"/>
<div class="title"><p class="booktitle">Advances in web-based education: personalized learning environments... </p><p><a id="header1" href="javascript: toggle2('content1','header1');">[+] Book Information</a>*</p>
</div>
<div id="content1" class="content" style="display: none; ">Description</div>
</div>
</div>
I have a work-around with tables but I know that is messy and usually undesirable so I wanted to ask some of the best if there is a better way. I have worked on this for days with two other guys that have some web design