function column_height() {
var h = $("#center").outerHeight(); // outerHeight return height plus padding
$('#leftcol').css('height', h);
$('#rightcol').css('height', h);
}
That looks like a php error not a jquery error? Do you have jquery loaded on your page? Did you make sure to put that function in a js file and not a php file?
I do not know how to use it as a jquery.
Hey, Glenn.
You can also use CSS. I browsed online for a step-by-step tutorial for you to follow. click here for the reference.
It's working I already tried it myself. Let me know if you are having a difficult time I will help you out.
Cheers!
That's basically what I did. Here's an example.
http://glennbates.com/sites/site5/
background: url(topleft.png) top left no-repeat, url(top.png) top repeat-x, url(topright.png) top right no-repeat, url(right.png) right repeat-y, url(left.png) left repeat-y;
Holy jesus, mary, and joseph dude! You have 70,000 divs in there just for that border image? There are much easier ways to do that with CSS. You can set background images to certain positions and repeats so in your case it would be...
HTML:background: url(topleft.png) top left no-repeat, url(top.png) top repeat-x, url(topright.png) top right no-repeat, url(right.png) right repeat-y, url(left.png) left repeat-y;
So on and so forth. and that's all one div.
Sorry that I went a little ghetto for a second that was just shocking.
Holy jesus, mary, and joseph dude! You have 70,000 divs in there just for that border image? There are much easier ways to do that with CSS. You can set background images to certain positions and repeats so in your case it would be...
HTML:background: url(topleft.png) top left no-repeat, url(top.png) top repeat-x, url(topright.png) top right no-repeat, url(right.png) right repeat-y, url(left.png) left repeat-y;
So on and so forth. and that's all one div.
Sorry that I went a little ghetto for a second that was just shocking.
Where do you get 70,000?
It was an exaggeration... you have 11 empty divs for the soul purpose of having a border image. That's unnecessary. If you use the method I described you won't even have to worry about the div height.
I did. Didn't work. Take a look.
Hmmmm it says invalid property value... syntax looks right though. Not positive. Try looking here at border images and multiple background images. I've never actually worked with either of them because I haven't ran into a situation where I needed it but it looks like example 27 should fit your needs. Sorry for harping so hard and then being wrong in my solutionbut I do know the way you're doing it is wrong... all those empty divs.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
$(function() {
var h = $("#center").outerHeight(); // outerHeight return height plus padding
$('#leftcol').css('height', h);
$('#rightcol').css('height', h);
})
</script>
You need to put this in your <head>:
<script>
This was so funny the first time I read it.
haha have you ever seen the </head><body> tattoo?