css background-position - png images not displayed as positioned in css -
Background condition is not working for some reason I am trying to install several planetary systems filled with PNGs so that I can do some other coding, but the images are all standing on top of each other and some of them are cut into the div.
CSS:
body {background-image}: URL ('../ img / para2 / space_bg.jpg'); } # Planetary {background: url ('../img/para2/ planet_1.png'); Height: 200px; Width: 200px; Status: Completed; Margin: 0; Padding: 0; Display area; Background-position: 400px 400px; } # Planet 2 {background: url ('../ img / para2 / planet_2.png'); Height: 200px; Width: 200px; Status: Completed; Margin: 0; Padding: 0; Display area; Background-position: 800px 600px; } # Planet_3 {background: url ('../ img / para2 / planet_3.png'); Height: 200px; Width: 200px; Status: Completed; Margin: 0; Padding: 0; Display area; Background-position: 450px 700px; } # Planet_4 {background: url ('../ img / para2 / planet_4.png'); Height: 200px; Width: 200px; Status: Completed; Margin: 0; Padding: 0; Display area; Background-position: 700px 350px; }
html:
& lt ;! DOCTYPE html & gt; & Lt; Html lang = en & gt; & Lt; Top & gt; & Lt; Title & gt; Basic PARALLAX MOUSE 2 & lt; / Title & gt; & Lt; Meta charset = "UTF 8" & gt; & Lt; Link rel = "stylesheet" href = "css / para2.css" & gt; & Lt; Script src = "java / jquery-2.1.1.js" & gt; & Lt; / Script & gt; & Lt; Script src = "java / jquery_ui.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "planet_1" & gt; & Lt; / Div & gt; & Lt; Div id = "planet_2" & gt; & Lt; / Div & gt; & Lt; Div id = "planet_3" & gt; & Lt; / Div & gt; & Lt; Div id = "planet_4" & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;
It feels awkward that I can not have the position of my planets where I want to, I am convinced that I have syntax right on the background-element elements
You did not give any status to your divs. Try adding this CSS code to any of these:
top: 50px; Left: 50px;
You will see it in a different position than others. Maybe you were trying to do with the background-position, but it is for the status of a background image, not the HTML element.
Hope I can help you;)
Comments
Post a Comment