PDA

View Full Version : Menu length to footer


JohnL
01-01-2009, 10:24 PM
Hello and a good New Year to all....

My question is to do with the side menu. Here is a link to the page:

http://azdeadpestcontrol.com.au/dw/example2/azdead2.html

Looking at the menu at the CSS sidebar1 properties, what I have done here is to adjust the padding. Works out OK if I do on the one page I am wokring on, but I would like to know if there is a way that the side bar will adjust to the size of the page so that I don't have to adjust the padding to the page that is the longest to compensate for those that are not?

So if I have a page that has 10 lines of text and another that has 100 lines of text, the sidebar will adjust automatically to compensate for the size of the page, with the background image running the length of the sidebar...can it be done?

Thanks for any help you can give,

JL

edbr
01-03-2009, 02:23 AM
add an image in the wrapper the width of your side bar and make it background-repeat: repeat-y; of course position it behinf the side bar so i appears as one

JohnL
01-07-2009, 10:13 AM
Thanks edbr but that did not seem to work. The only way that I have managed to adjust the length of the repeat is by increasing the maring bottom. Here is the new link and the one I will be working off from now on:

http://azdeadpestcontrol.com.au/dw/example3/azdead3.html

and

http://azdeadpestcontrol.com.au/dw/example3/contact.html

You will notice that both lengths are different to accomodate for the differing lenghts of each page. Any more help is appreciated,

JL

JohnL
01-11-2009, 09:23 PM
Is there anyone that can assist with this please? There must be an easy fix. I have searched high and low re the sidebar settings and can't find anything that helps. The book I have on DW does not provide any tips either.

Thanks once again,

JL

coloeagle
01-11-2009, 10:47 PM
Don't have time right now to write and test, so here is a couple starter ideas for you.

Add the spider image to your #container as a background image;
background:#fff url("spiderroundfade2.gif") repeat-y;
Add a width to your #mainContent and float this right.
float:right;width:600px;

By having the image in the container as long as your content is longer than the sidebar everything should work out for you.

You may then have to add clear:both to your #footer

JohnL
01-13-2009, 08:19 AM
Sorry, but that did not seem to work. It pushes all the text way below the sidebar and the image does not go all the way to the footer. I did not add the code to the live site.

Thanks for any assistance and sorry to be a right royal pain...

JL

edbr
01-13-2009, 09:25 AM
check the attachment out its a 2 column page with background image tat stretches with content added ti second (text) 539div

coloeagle
01-13-2009, 04:27 PM
Haven't looked at the zip file that ed created. Take a look at this page I've posted to my website. I have added a little script that will hide and show text so you can view just how having the image in the container will expand and contract depending on the amount of text placed in the mainContent div.
validwebdesigns.com/construction/johnj/

JohnL
01-15-2009, 10:07 AM
Thanks so much coloeagle. I used your fix and it works fine....on all pages except the contact form. For some reason the side bar BG goes to far to the right for about 3 repeats vertical. I guess I will need to work on it. I have just adjusted the length (like on the original version) for the time being until I can figure out the fix.

Big thanks to you too edbr. I have saved you css and will give it a go as well.

Thanks for all the help. It is TRUELLY much appreciated and I am ever humbled by the help these forums provide.

JL

coloeagle
01-15-2009, 02:41 PM
I used your fix and it works fine....on all pages except the contact form. For some reason the side bar BG goes to far to the right for about 3 repeats vertical.
This shouldn't be happening if all the html is consistent.

Can you give us a link or the code/s for the contact page?

JohnL
01-15-2009, 07:37 PM
This shouldn't be happening if all the html is consistent.

Can you give us a link or the code/s for the contact page?

The link is: http://www.azdeadpestcontrol.com.au/dw/example3/contact.html

I just tried it again as I thought I may have missed a bit of code but it it still happening. I have reveretd it back to what it was.

This might seem a silly question but....with the CSS portion of the code, it is embedded on each page. I assume it is better to have the css file seperate and the have each page refer to it?

Thanks for your help.

Corrosive
01-15-2009, 09:21 PM
This might seem a silly question but....with the CSS portion of the code, it is embedded on each page. I assume it is better to have the css file seperate and the have each page refer to it?

Thanks for your help.

Not a silly question at all. Yes, yes, yes...a separate style sheet linked into every page with consistent layout throughout or it kind of ruins the point of CSS. I.e. being able to make site-wide changes from just one file. CSS in head tags is fine for planning a site but when you build, use a separate sheet.

JohnL
01-15-2009, 10:50 PM
Not a silly question at all. Yes, yes, yes...a separate style sheet linked into every page with consistent layout throughout or it kind of ruins the point of CSS. I.e. being able to make site-wide changes from just one file. CSS in head tags is fine for planning a site but when you build, use a separate sheet.

I have done a couple of sites that has the seperate CSS sheet and thought that would be the case. There is a saying that goes something like "The silly questions are the easiest to answer."

Thanks for the reply....

Corrosive
01-16-2009, 06:10 AM
"The silly questions are the easiest to answer."

He, he....no doubt :wink:

JohnL
01-16-2009, 11:43 PM
This shouldn't be happening if all the html is consistent.

Can you give us a link or the code/s for the contact page?

I managed to fix it. It was a html issue. I put some content in the wrong section. All OK now so thanks once again for your assistance. No doubt I will have more questions as time goes on.

Thanks again and enjoy your weekend

JL