html - best way to define right position if width is 100% and body has a border margin -


I want a line of text on the right side of the website.

Width body is set to 100% and there is also a margin-left of 20px in the body.

If I set the width of these to be achieved now and the text slave is set to "right", the text line is slightly out of the browser, because the difference of 20px is also passed.

Because I can not put widht = inheritance - 20 px or heir - margin-left (k) of

what is the most beautiful way

Try the position: with absolute left left: 0 pixels; Correct -20px; .

(It is that I am gathering your problem, though some examples HTML and CSS clarify your question.)

Comments