Forum Moderators: open

Message Too Old, No Replies

Can Hor And Ver lines be colured in HTML please help

         

midi25

8:50 pm on May 14, 2002 (gmt 0)

10+ Year Member



Hi i want to create some horizontal and vertical rules for my page. I have tried using 2 gifs but when i add them in go live they dont line up as the program wont allow you. It leaves little gaps between images. I want to create a coloured hor and a ver line that meet up nicely on my page. What is the best way of doing this.

Thanks

fashezee

8:56 pm on May 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



for the horizontal line:
<hr color="red">

For the vertical line, you can use a spacer gif to position your blue coloured gif exactly where you want it.

pcguru333

9:15 pm on May 14, 2002 (gmt 0)

10+ Year Member



When using img tags and you want to eliminate gaps you need to place the tags side-by-side.

i.e <img src = "ver.gif" /><img src = "hor.gif />

you must remove all whitespace between the tags

Morrison

9:17 pm on May 14, 2002 (gmt 0)

10+ Year Member



you can also set the height of the rules using <hr height=1>
or useing css.

mivox

9:24 pm on May 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



for the horizontal line:
<hr color="red">

Don't know about Windows, but on Macintosh this code only works in IE. Opera and Netscape 4 both show a regular <hr>

knighty

8:20 am on May 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A number of different ways

1) get a one pixel GIF then in the HTML set the size to the desired width/height

2) palce a transparent GIF in a cell and set the background to what ever color you want

3) use a layer and CSS to set a border on one side

chiyo

9:06 am on May 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I make a 1 pixel (or 2-3 pixel) colored gif whatever color you would like. Then use the height and width attributes to stretch it to as long as you like. Simple solution but always works. You only need to use one gif so dont have to have more than one fetch. One fetch, and as long as its the same color all your lines are there at once. And if on other pages it is cached. Only problem is that some validation programs tell me that i am using wrong width and height attributes! Becuase of a site redesign we dont use these anymore, but it worked well when we did.