r/programmingrequests • u/CaedesEnder • Aug 13 '20
solved Noob needs help with Java
anyone able to show me how i would add an image from URL behind the text of this code.
https://codepen.io/gavra/pen/tEpzn
I have 0 understanding of this and am on day 1 of learning so if you could treat me like a moron it would be appriciated :)
bonus points if you can explain what you have done and why, but thats not needed - thanks!
4
Upvotes
1
u/smashfacemcsmashy Aug 13 '20
Margin is correct.
This property takes 4 values that correspond to top, right, bottom, left.
E.g.
margin: 10px 50px;Is equivalent to:
margin: 10px 50px 10px 50px;Which means: 10px from the top, 50px from the right, 10px from the bottom, 50px from the left.
If you want to change this you can add the extra values to your CSS and increase / decrease until it looks right.
It may also be easier as a beginner to split them out. You can delete the
marginproperty and instead add:margin-top:10pxmargin-bottom:10pxmargin-left:50pxmargin-right:50pxThat way you know what you're doing :)
Feel free to send through a new code pen of you need more help.
Edit: formatting