Welcome to Katz - Pinoy Underground Forum

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?
  • Compact Safety Notice
  • Weekly Grants Lottery is live! Win a 20,000 ₪ jackpot — tickets are just 30 ₪, drawn every week. Buy your tickets »

Question How do I move a "div" element to where i want it exactly within a webpage?

P 247

Panji12

2nd Account
Member
Access
Member
Access
3 Year Silver Member 3y Silver
Joined
Jun 26, 2023
Messages
87
Reaction score
1
Points
8
grants
₲75
There are so many ways to do that, you can use margin, padding, flex etc.
 
S 0

spiderman69123

Transcendent
BANNED
Member
Access
Banned
Joined
Mar 6, 2024
Messages
35
Reaction score
22
Points
8
grants
₲122
medyo kaya naman yan master isearch lang sa google, maraming paraan pero ikaw makakapagdesisyon kung anong pinaka ok para sayo
 
C 146

christinechareyt

Transcendent
Member
Access
Member
Access
2 Year Silver Member 2y Silver
Joined
Apr 20, 2024
Messages
40
Reaction score
0
Points
6
grants
₲60
u can do it by targeting the specific class for ex:
style.css
.sample{
margin: 10px ( it takes each sides from top, left, right, bottom );
padding: 10px ( it takes also each sides from top, left, right, bottom but it compressed the content inside of a div so kapag may content ka sa loob ng targeted div mo, malalagyan sya ng margin sa loob );
}
and there's position property where it based naman sa specific attributes for ex:
.sample{
position: absolute; ( what this do is u're removing the element inside of it's parent elements so u can move it freely by using properties. positions also comes with variety of attributes such as relative, sticky, block, static, and fixed )
left: 10px; ( u're positioning 10px from left and it can also be done in different properties left, right, top, and bottom )
}
hope this helps.
 
C 0

Cziok

Transcendent
BANNED
Member
Access
Banned
Joined
Apr 30, 2023
Messages
31
Reaction score
2
Points
8
grants
₲142
u can do it by targeting the specific class for ex:
style.css
.sample{
margin: 10px ( it takes each sides from top, left, right, bottom );
padding: 10px ( it takes also each sides from top, left, right, bottom but it compressed the content inside of a div so kapag may content ka sa loob ng targeted div mo, malalagyan sya ng margin sa loob );
}
and there's position property where it based naman sa specific attributes for ex:
.sample{
position: absolute; ( what this do is u're removing the element inside of it's parent elements so u can move it freely by using properties. positions also comes with variety of attributes such as relative, sticky, block, static, and fixed )
left: 10px; ( u're positioning 10px from left and it can also be done in different properties left, right, top, and bottom )
}
hope this helps.
Thanks po
 
G 194

gobblemenuts

Abecedarian
Member
Access
Member
Access
2 Year Silver Member 2y Silver
Joined
Aug 24, 2024
Messages
84
Reaction score
1
Points
8
grants
₲70
advise ko magaral ka maglagay ng border tapos maglook ka into flex
 
Top Bottom