SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: New to css... Is this possible?
-
Sep 29, 2004, 19:29 #1
- Join Date
- Oct 2003
- Location
- P Town
- Posts
- 167
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
New to css... Is this possible?
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.
-
Sep 30, 2004, 01:40 #2
- Join Date
- May 2003
- Location
- Cambridge, UK
- Posts
- 2,366
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You could make the box 90% of the desired width, with a 5% left and right margin?
-
Sep 30, 2004, 08:45 #3
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
You need to rub some of the line out to get that effect.
Code:<!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