+ 1
HTML element position
How can I manipulate the position of my html elements? For example how can I move a group of texts like the “hello world” text in the sample code to another location in the page https://code.sololearn.com/WKhxtaRih1sq/?ref=app
8 Respuestas
+ 6
Nwanakwoakwo Wid'obiagu You can use align attribute like this:
<div align="center">
</div>
Change it to left or right where you want to align.
+ 3
It is possible by simply changing the position of your elements using CSS. See this:
https://www.w3schools.com/css/css_positioning.asp
The basic positioning can be easily done by using align in HTML, but using positioning and alignment in CSS is more recommended.
+ 2
Nwanakwoakwo Wid'obiagu Here you go bro :))
https://code.sololearn.com/WI2KXqITPFFx/?ref=app
If you want an image to be dragged just put it inside the div :))
+ 2
Nwanakwoakwo Wid'obiagu Oh I got you now :))
This how you do it :
<div style="position: absolute; left: 50px; top: 50px;">Hello World</div>
The text will appear at 50 pixels from the left and 50 pixels from the top :)) You can set it to any value and the div will be positioned according to what you set!
+ 1
thank you Marzan im having trouble accessibg that link please have u got another i can use?
+ 1
thank u so much guys ill try them out
0
Arb Rahim Badsa hi i understand this but i would like to know how to set the atrributes for the div tag so that the elements inside appear where i want them on the web page