N
N
NeOn4eG2010-09-02 23:36:23
css
NeOn4eG, 2010-09-02 23:36:23

Layout. How to implement border inside the block, and not on its border? Example in description

I want to get rid of the background-image, I will make the gradient through box-shadow in css, but how to make a dotted line?
image

You need to get by with one tag to feed it later jqueryui.com/demos/button/
Any ideas?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
C
CaptainQuazar, 2010-09-02
@NeOn4eG


<div></div>


body{background:#000}
div{
width:100px;
height:30px;
background:#F00;
border:#FF0 dashed 1px;
border-radius:5px;
Box-shadow:0px 1px 0px #f00,0px -1px 0px #f00,1px 0px 0px #f00,-1px 0px 0px #f00;
}

So get the proper effect, pay attention, the shadow should look in all 4 directions so as not to spoil the figure.

S
Sererator, 2010-09-02
@Serator

outline:1px dashed red;
outline-offset:-4px;

H
homm, 2010-09-03
@homm

I will add CaptainQuazar. 4 shadows are not needed, one is enough.


<div></div>
<style>
body{background:#000}
div{
width:100px;
height:30px;
background:#F00;
border:#FF0 dashed 1px;
border-radius:5px;
Box-shadow:0px 0px 0px 2px #f00;
}
</style>

Z
zibada, 2010-09-02
@zibada

outline: 1px solid #color;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question