Forum Moderators: not2easy

Message Too Old, No Replies

Is there a way to offset border-right to be up higher?

Can you emulate margins on a border?

         

Clark

8:08 pm on Mar 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does anyone know of a trick to get a border to expand beyond the current element?

I've got a border-right that would look fantastic if it were up a little higher, but I can't think of a way to get it to start exactly where I want it. What are the techniques for this?

vol7ron

8:19 pm on Mar 12, 2008 (gmt 0)

10+ Year Member



Can you wrap it in another element, or, make your own border?

MarkFilipak

9:12 pm on Mar 12, 2008 (gmt 0)

10+ Year Member



A border will always be as tall (wide) as its bounding box's height (width). That said, try this in your browser:
<div style='position:absolute; top:5em; width:10em; height:15em; background-color:cyan'>
<div style='position;absolute; top:-1em; right:-1em; width:1em; height:100%; border-right:solid black 1px'>
</div>
</div>

[edited by: SuzyUK at 10:44 am (utc) on Mar. 13, 2008]
[edit reason] minimised sidescroll [/edit]

Clark

12:50 am on Mar 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Meant to reply earlier...I thought I had some problems in flexibility because it was in a UL underneath the YUI, which sometimes gives you weird results, but then I realized that the parent element could be perfectly manipulated to get the desired effect. Thanks all :)