Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic border using css help

Status
Not open for further replies.

iostream71

Programmer
Mar 13, 2002
229
0
0
US
i'm trying to make a dynamically sized border from images for some content using only css(no tables). i can make one that works with static sizes, but it won't work if i use percentages

basically want this layout:

|lCorner| |middle| |rCorner|

|lSide| content |rSide|

|lCorner| |middle| |rCorner|



hope that mades sense
 
Hello there,

I'm afraid this is not possible. According to choices available in TopStyle and the documentation (CSS, The Defintive Guide), you have to define a length (px, pt, em...) but percentages are not allowed.

Of course, you should be able to do it on the server-side, if you create your pages via a server-side technology (php, jsp, asp...). Just do something like the following:

border-width: $variable;

And write a script that instantiate $variable as a % of, i.e., the image width.

I hope this helps.

Cheers,

xso
 
I wouldnt give up yet, surely all you need is coloured DIVs to act as your border?

show a layout technique using percentages for both positioning and width. Might be worth a look.


É

endamcg-logo1b.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top