How to set width correctly in CSS - Need to fix bug with Safari on Mac and on iPad


Tags: html,ios,css,osx,safari

Problem :

i'm making page http://www.rhemapress.pl/www_physis/index.php?id=1. As you see header background is on 100% width (orange). It's first element in <body>. Code for this is: <div id="header"></div>. And CSS for this element is:

#header {
width: 100%;
height: 174px;
background-image: url("img/top-line.jpg");
position: absolute;
z-index: 6; 
margin: 0px 0px 0px 0px;
}

It's ok on Safari on Mac. When i use Safari on iPad, header isn't set correctly - it's not 100% width.

Where's the problem? Could you help me with it?



Solution :

Thank you all for answers. I think it's not possible to do this correctly, but if I in mistake then respond this with correct answer. I moved #header background to <body> in CSS and set repeat-x. Now it's working correctly but it's does not solve the problem with 100% width of element on notebook and mobile device (ipad).


    CSS Howto..

    Flexbox: How do I create my thumbnails to span 100% of the container width?

    How can I add specific css id to parent menu with php or javascript

    HTML/CSS/jQuery: How to set an “absolute text bottom” so that further text expands upwards?

    how to fix closure compiler error on css({ float: 'left' }) [duplicate]

    How to count the number of correct answers using Javascript?

    How to change SVG color (when using the SVG as background in CSS)

    How to get jQuery to recognize mouse over image once per hover

    Border positioning: how to?

    How to add image after button/div css?

    Using CSS, how do you anchor an element to a baseline and size it based on another “pinned” element?

    How to style a GWT CaptionPanel?

    How to implement .SCSS on my own website? [closed]

    How to access CSS children properly?

    how to force horizontal scrolling in an HTML list using CSS?

    My sidebar is fixed no matter what. How do I make scrolling possible with the sidebar?

    How to get the “true” computed CSS width in Chrome / IE

    Jquery Toggle Button image and Div Show/Hide

    How to make search bar responsive using CSS

    How to check if a css/js resource is included in head

    How come my