Ask coding questions

← Back to all posts
[CLOSED] Move a border
RYANTADIPARTHI (6009)

Hi,

i just want to know how to move a border in css. like you would say border: 1px solid grey. But, the position of it isn't right, i want to know how to move it the position of the border around.

Thanks in advance!

Comments
hotnewtop
tussiez (1568)

You cannot move borders. As others have said, use margins/padding/etc

RYANTADIPARTHI (6009)

@tussiez no, i'm good now. InvisibleOne helped me. But i decided not to use it. it did work though a bit.

Coder100 (17613)

borders can't move. Do you mean the position of the element?

Use:

  • margin for the area surrounding the element.
  • padding for the area inside the element.
RYANTADIPARTHI (6009)

@Coder100 no, i'm good now. InvisibleOne helped me. But i decided not to use it.

InvisibleOne (2840)

How do you mean, not in the right position?

RYANTADIPARTHI (6009)

@InvisibleOne meaning like, i want the position in one part, but it's out. like this.

what happened

|      rkflekf         |
|       rkflekf        |
|      rkflekf         |
|                      |
|                      |
|                      |
|     rkflekf          |
|                      |
|                      |
|                      |

what i want

    |   rkflekf    |
    |   rkflekf    |
    |  rkflekf     |
    |              |
    |              |
    |              |
    | rkflekf      |
    |              |
    |              |
    |              |

like that. i want the border to move.

InvisibleOne (2840)

add a margin to the outside of it @RYANTADIPARTHI

RYANTADIPARTHI (6009)

@InvisibleOne thanks, it kind of works, but i decided I'm not going to use it.