# Css and html to repeat background vertically

**URL:** <https://forum.kirupa.com/t/css-and-html-to-repeat-background-vertically/185560>\
**Category:** Uncategorized\
**Created:** [April 14, 2006, 6:53am UTC](https://forum.kirupa.com/t/css-and-html-to-repeat-background-vertically/185560 "2006-04-14T06:53:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitaeshi](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@kitaeshi](https://forum.kirupa.com/u/kitaeshi)\
**Post date:** [April 14, 2006, 6:53am UTC](https://forum.kirupa.com/t/css-and-html-to-repeat-background-vertically/185560/1 "2006-04-14T06:53:59Z")

</div>

Hi all, i been trying to make a background or a border line to repeat vertically, like the line or pic will draw or show from top till bottom.

one way is to define the table height or else the table wont stretch till the bottom, but different ppl have different monitor size so if i stretch too much there will be a stroll bar on the right which shldnt appear if the resolution is high enough, and if i stretch too little, the border or pic cannot repeat from top till bottom.

i have tried putting the height 1200 and in css declare html{overflow:hidden}, it works, but only for those with big resolution monitor and those low resolution like 800 x600 will have difficulties as the content will be hidden.

is there other way out.

thxs for reading

---

<div class="post-metadata">

**Author:** ![kitaeshi](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@kitaeshi](https://forum.kirupa.com/u/kitaeshi)\
**Post date:** [April 14, 2006, 7:23am UTC](https://forum.kirupa.com/t/css-and-html-to-repeat-background-vertically/185560/2 "2006-04-14T07:23:12Z")

</div>

i tink i found the solution…just put a div content absolute, bottom 0 and will fix the problems 🙂

---

<div class="post-metadata">

**Author:** ![Dwight](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@Dwight](https://forum.kirupa.com/u/Dwight)\
**Post date:** [April 14, 2006, 1:34pm UTC](https://forum.kirupa.com/t/css-and-html-to-repeat-background-vertically/185560/3 "2006-04-14T13:34:28Z")

</div>

Why don’t you try this:

[LIST]  
[_]Make a .gif file with a part of your line (for example 20px high)  
[_]Attach this to the body with css(see code below)  
[\*]Let is repeat verticaly (see code below)[/LIST]So here is the code, let’s assume that you called your gif “bg.gif”:

```auto

body {
               background-image: url(bg.gif);
               background-repeat: repeat-y;
               }

```

That’s all 👼

---

<div class="post-metadata">

**Author:** ![kitaeshi](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@kitaeshi](https://forum.kirupa.com/u/kitaeshi)\
**Post date:** [April 14, 2006, 2:06pm UTC](https://forum.kirupa.com/t/css-and-html-to-repeat-background-vertically/185560/4 "2006-04-14T14:06:56Z")

</div>

it can only apply to the body, but now i trying to put the code inside the table…even setting 100%, it still dont work.

---

<div class="post-metadata">

**Author:** ![Dwight](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@Dwight](https://forum.kirupa.com/u/Dwight)\
**Post date:** [April 14, 2006, 2:13pm UTC](https://forum.kirupa.com/t/css-and-html-to-repeat-background-vertically/185560/5 "2006-04-14T14:13:45Z")

</div>

Oke but why do you want it on the table? Don’t really get that point…  
Maybe if you post your code, I can help you further.

---

<div class="post-metadata">

**Author:** ![kitaeshi](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@kitaeshi](https://forum.kirupa.com/u/kitaeshi)\
**Post date:** [April 15, 2006, 12:29am UTC](https://forum.kirupa.com/t/css-and-html-to-repeat-background-vertically/185560/6 "2006-04-15T00:29:12Z")

</div>

[http://web.designworkz.com.sg/designworkz/who1.html](http://web.designworkz.com.sg/designworkz/who1.html)

this is the site tat i’m working on, the vertically line on both the left and right cannot span vertically throughout the screen even i if i set 100%, the only way is to set a height, but when ppl with low resolution monitor will see a scroll bar if the height is set too much, and if set too little, ppl with high resolution will see the line end and not span fully verticllly.
