Is it possible to set margin in percents ?
And
How can I set only text margin without moving div where it's in?

1 yes see here

2. just put the text in a paragraph element or another div and set the margin on that. :D

I got this.
But is there something other ?

I mean 2 answer of course

what else would you like to know? :)

Another way of doing point 2.

not really,
that is the best answer you are going to find, accurate and simple, code compliant, current practice, proper use of styling.

as a visual aid
draw some boxes, boxes represent html block elements
you can create/move/edit a box inside another box easily, change its border, change its margins, change its content, if you want to change part in a box, you draw another box around the part and change that

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.