I am trying to make a box with a border that only goes 90% of the way across a side of the box.
For instance I would like a top border to not go all the way across the top but only 90% of the top.
I hope that was not to confusing of a description.
| SitePoint Sponsor |

I am trying to make a box with a border that only goes 90% of the way across a side of the box.
For instance I would like a top border to not go all the way across the top but only 90% of the top.
I hope that was not to confusing of a description.





You could make the box 90% of the desired width, with a 5% left and right margin?


You need to rub some of the line out to get that effect.
PaulCode:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> #outer{ width:50%; border:1px solid #000; position:relative; height:200px; } #border{ background:#fff; height:1px; overflow:hidden; position:absolute; right:0;top:-1px; width:10%; } </style> </head> <body> <div id="outer"> <div id="border"></div> </div> </body> </html>
Bookmarks