Forums

CSS

This topic is locked

Disjointed Div Borders

Posted 28 Oct 2007 23:56:49
1
has voted
28 Oct 2007 23:56:49 Matt Allison posted:
Got a layout that I want to do. Here’s the mock-up.

www.planetallison.com/mm/gif/css_problem.gif

Having trouble with the borders of the content div. Basically I know there’s no way to make the left border of the content disjoint like that. And I think the fluidity is going to be a problem as well. If the content was always longer than the nav bar I think I could add an image as the background and trick it out that way. However, if the content is shorter and doesn’t float back to the left absolute border then I’ll have this strange line at the bottom of the navbar and on the side where the text doesn’t fall.

Does anyone know of an easier way to do this?

Replies

Replied 01 Nov 2007 17:17:04
01 Nov 2007 17:17:04 john newsome replied:
i think i have a sollution to your problem sorry for the delay but i've only just seen this

css
#mainbox{
border:#000000 1px solid;
width:400px;
word-wrap: break-word;
padding-top:10px;
padding-left:10px;
}
#float{
float:left;
background-image:url(images/bk.png);/*this is just a 1px by 1px white dot*/
position:relative;
top:-11px;
left:-11px;
padding-right:10px;
margin-right:10px;
width:100px;
border-right:#000000 1px solid;
border-bottom:#000000 1px solid;
}


html

<div id="mainbox">
<div id="float">
<ul><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li></ul>
</div>
how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test how are you this is a test
</div>

Reply to this topic