
Originally Posted by
njfrese
The problem is that the list is being styled (blown up as you put it) the same way your according list is.
This is because all your lists are in a div container with class="haccordion". In the CSS code (haccordion.css) you'll see the following
Code:
.haccordion ul{
margin: 0;
padding: 0;
list-style: none;
overflow: hidden; /*leave as is*/
}
.haccordion li{
margin: 0;
padding: 0;
display: block; /*leave as is*/
width: 100%; /*For users with JS disabled: Width of each content*/
height: 558px; /*For users with JS disabled: Height of each content*/
overflow: hidden; /*leave as is*/
float: left; /*leave as is*/
}
These lines are what is causing the new list to blow up.
So, you have a few options to fix this but it's definitely possible. I would change these CSS to this:
Code:
.accordionlist{
margin: 0;
padding: 0;
list-style: none;
overflow: hidden; /*leave as is*/
}
.accordionlistitem{
margin: 0;
padding: 0;
display: block; /*leave as is*/
width: 100%; /*For users with JS disabled: Width of each content*/
height: 558px; /*For users with JS disabled: Height of each content*/
overflow: hidden; /*leave as is*/
float: left; /*leave as is*/
}
and change your HTML code to this
Code:
<div id="hc1" class="haccordion" style="width: 870px; height: 700px; overflow: hidden;">
<ul class="accordionlist">
<li style="width: 685px; display: block;" class="accordionlistitem"></li>
<li class="accordionlistitem" style="width: 30px; display: block;">Content goes here, including any new lists you want to include</li>
<li class="accordionlistitem" style="width: 30px; display: block;">Content goes here, including any new lists you want to include</li>
<li class="accordionlistitem" style="width: 30px; display: block;">Content goes here, including any new lists you want to include</li>
<li class="accordionlistitem" style="width: 30px; display: block; overflow: hidden;">Content goes here, including any new lists you want to include</li>
<li class="accordionlistitem" style="width: 30px; display: block;">Content goes here, including any new lists you want to include</li>
<li class="accordionlistitem" style="width: 30px; display: block; overflow: hidden;">Content goes here, including any new lists you want to include</li>
</ul>
</div>
That should work, I haven't tried it out but I don't see what could go wrong since it's really just a CSS issue. So anyway what this does is it prevents any new unordered lists (<ul>) and any list items (<li>) from being blown up because the styles will only affect unordered lists with the class="accordionlist" and list items with the class="accordionlistitem". Any list or list item that does have those classes will simply go back to their default settings.
There are many approaches to solving this issue, in some ways my suggested code could be improved upon to be less cluttered. Btw nice site design!
Bookmarks