N
N
No Name2013-12-11 19:22:52
HTML
No Name, 2013-12-11 19:22:52

html tag on page zoom

Good day! Tell me how to correctly write a piece of code in html so that when you change the scale of pages when you press Ctrl + (zoom in) or Ctrl- (zoom out), the header does not crawl to the left relative to the rest of the page.
piece of code
.sci_topbg { background: #496BAB url(image address/5555.gif) left top no-repeat; width: 1856px; height:155px;}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Sidorenko, 2013-12-11
@iskros

Most likely you need to set the position (if you are positioning with this) like the content.
Or set margin in one unit.

V
Vladimir Kiselyov, 2013-12-12
@bmg

.header{
 width: 250em;
 left: 50%;
 margin-left: -125em;
}

<div class="header">HEADER</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question