Forum Moderators: not2easy

Message Too Old, No Replies

use an image as a cell border?

can i use a 1px wide image to replace a solid colour border in CSS?

         

hughie

9:03 am on Dec 9, 2004 (gmt 0)

10+ Year Member



Hi all

I've got a horizontal menu which uses a background image to add some shadow to it. each menu item is in a cell and the right hand side of each column has a 1px wide cream border. This is fine but overlaps the shadow and looks a bit odd.

I would like to replace this border with a 1px graphic so that the shadow isn't interrupted.

Any ideas?

Cheers,
hughie

moltar

9:20 am on Dec 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can remove the border completely and assign a background image to each cell like this:

background: url("bg.gif") no-repeat top right;

Make your image as 1px wide and the height of your menu with the desired effect.

hughie

10:03 am on Dec 9, 2004 (gmt 0)

10+ Year Member



trouble is i dont know the width of each cell (CMS driven) so i dont know where the right border will appear. The only way i can see to do it so far is another table cell 1px wide for each border element. I'd rather not as this will add a lot of excess HTML.

Cheers,
hughie