PDA

View Full Version : Splitting a <div> (I think)


Alan Shaw
06-25-2009, 01:29 AM
On my 3 column page, in the first column I have a menu, horizontal rule and 3 images.

http://www.wokingaerials.co.uk/dttv.html

What I would like to do is always position the 3 images at the very bottom of this first column, whose length is governed by the amount of content in the middle column.

I've tinkered with it but have yet to find the solution.

I've thought about making this column into a wrapper and then naming two different div's inside it with different CSS positioning, but I think it is slightly over my head right now being new to CSS.

The basic layout is currently this:

<body>

<div id="outerWrapper">
<div id="header">header</div>
<div id="topNavigation">top nav</div>
<div id="contentWrapper">
<div id="rightColumn1">right column</div>
<div id="leftColumn1">left column</div>
<div id="content">middle column</div>
</div>
<div id="footer">footer</div>
</div>

</body>

I think what I need to achieve is to somehow split "leftColumn1" into 2 div's, then insert the images within the new 2nd div and somehow force that second div to always be at the bottom of "leftColumn1"

The first div of course with contain the menu.

Any ideas?

Ray Borduin
06-25-2009, 08:11 AM
You would add divs inside the left column like:


<div id="leftColumn1">
<div id="topleftColumn1">top left column</div><div id="bottomleftColumn1">bottom left column</div>
</div>

Then you can position bottomleftColumn and topLeftColumn how you need them inside the leftColumn.

Alan Shaw
06-29-2009, 12:46 AM
Thanks Ray, but having implemented that I am now having trouble positioning with CSS.

I don’t know if the top one needs positioning as it seems to default to the top of the left column, but whatever I have tried with the bottom one either does not work or sits at the bottom of the page overlapping the footer.

There's a fair bit of info out there on positioning but to me, some of it is as clear as mud. Just can’t seem to find the answer.

I’ve added this to my style sheet:

#outerWrapper #contentWrapper #leftColumn1 #topleftColumn1 {
}
#outerWrapper #contentWrapper #leftColumn1 #bottomleftColumn1 {
}

I just need to fill it in with something.

Ray Borduin
06-29-2009, 10:31 AM
Do you have a sample url with the page you are working on? That would give someone context from which they could help.

Alan Shaw
06-29-2009, 11:47 AM
http://www.wokingaerials.co.uk/irs.html

The idea is to aways have the 3 images at the bottom of the left column instead of nested up underneath the Menu or horizontal rule, and then I would probably do the same in the right column.

Ray Borduin
06-29-2009, 12:30 PM
You could try adding to the bottom left css:

bottom:0;
height:10px;
position:absolute;

That seems to do the trick for me

Alan Shaw
06-29-2009, 01:07 PM
I've added that to this page;

http://www.wokingaerials.co.uk/irs.html

but it has place the images outside the design, and has actually aligned it to the bottom of the browser window.

Try hitting F11 to remove the top of the browser and it shows the problem up more.

Ray Borduin
06-29-2009, 01:09 PM
It doesn't appear you have added the code and I'm not sure what images you see outside of the design. What browser are you using?

Ray Borduin
06-29-2009, 01:10 PM
OK I see what you are saying in IE. I was looking in FF which now looks correct.

Ray Borduin
06-29-2009, 01:18 PM
I think you need it inside #contentWrapper only, not the left column