PDA

View Full Version : vertical repeating div


mttallen
02-13-2007, 04:30 AM
I am having trouble allowing the #subnav div to repeat vertically down the page. I am not specifying a height and am using background-repeat:repeat-y; It only repeats down to the <img>'s within the list and no further. I tried putting a div that "clear:both;" within the #subnav but it did not seem to do anything. Is it possible to repeat a div vertically that contains no content or very little content at that?

<body>

<div id="logo">
<a href="../index.html"><img src="../img/icon.gif" class="logo"/></a>
</div>

<div id="name"><a href="../index.html"><img src="../img/tracicook.gif" class="name"/></a></div>

<div id="float">
<div id="subnav">
<ul>
<li><a href="contact.htm"><img src="../img/contact.gif" /></a></li>
<li><a href="illustration.htm"><img src="../img/illustration.gif" /></a></li>
<li><a href="animation.htm"><img src="../img/animation.gif" /></a></li>
<li><a href="concept.htm"><img src="../img/concept.gif" /></a></li>
<li><a href="life.htm"><img src="../img/life.gif" /></a></li>
</ul>

</div>

<div id="content">
<p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.</p>
</div>
</div>



</body>
</html>

#subnav {
float:left;
width:148px;
background-color:#c1c6cb;
background-repeat:repeat-y;
margin-right:10px;
}

shyam
02-13-2007, 07:30 PM
I think u've misunderstood what the background-repeat attribute in css is used for....its used for controlling the repetition of the background images not for expanding divs

ahallicks
02-14-2007, 12:29 PM
And you might want to set a specific height (either in pixels or percent), or an auto-height (that will wrap to the height of the text), or at least a min-height so that it is always at least a certain height?