I am facing an issue with the side borders on my website. I have a small image measuring 15x15 that repeats itself down the page on both sides. The problem is, when I set it to 100% height, the border only extends "one screen" down since my website's content is dynamic and constantly changing. I want the borders to adjust according to the total height of the page. Can anyone help me achieve this?
Below is the CSS code:
.bgr_right {
background-image: url(../Graphics/bgr_right.jpg);
background-repeat: repeat-y;
background-position: right;
position: absolute;
top: 0px;
height: 100%;
width: 30px;
right: 0px;
background-color: #E7F5F0;
}
This is the HTML DIV section:
<div class="bgr_right"></div>
Also, I'm not sure if using position: absolute is the correct approach here.
UPDATE: After going through the suggestions, I believe there might be a more efficient way to handle this. What if we use JavaScript? Is there a way to determine the body height using JavaScript? If so, could we then dynamically set the height of the div element accordingly?
<div height="javascript_function()" or something...
Any insights would be greatly appreciated!