Difference between static and relative positioning

0 votes
What is the difference between static (default) and relative positioning in CSS?
Jun 2 in CSS by Edureka
• 7,940 points
11 views

1 answer to this question.

0 votes
Static: The location of items is static by default. Nothing will be implemented if you add properties like top, bottom, right, or left. Relative: The change in position will be relevant to the initial location of that div. Fixed: The fixed property would remain in the same location even if we scrolled the page.
answered Jun 10 by Edureka
• 8,460 points

Related Questions In CSS

0 votes
1 answer

Why vh works and % doesn't? (height css)

The height of an element, by default, ...READ MORE

answered Jun 10 in CSS by Edureka
• 8,460 points
13 views
0 votes
1 answer

Position Relative vs Absolute?

position: relative moves an element relative to ...READ MORE

answered Jun 10 in CSS by Edureka
• 8,460 points
7 views
0 votes
1 answer

Setting top and left CSS attributes

You can alternatively use the setProperty method, ...READ MORE

answered Jun 10 in CSS by Edureka
• 8,460 points
8 views
0 votes
1 answer

How does the "position: sticky;" property work?

Do check if an ancestor element has ...READ MORE

answered Feb 16 in Others by Aditya
• 7,280 points
18 views
0 votes
0 answers

Fixed position but relative to container

I am trying to fix a div so it ...READ MORE

7 hours ago in CSS by Edureka
• 7,940 points
6 views
0 votes
1 answer

what do you mean by static block in java?

Static block is used for initializing the ...READ MORE

answered Jun 18, 2018 in Java by scarlett
• 1,290 points
400 views
0 votes
1 answer

Interface variable are static and final by default. Why?

Interface variables are static because Java interfaces ...READ MORE

answered Jul 4, 2018 in Java by Daisy
• 8,120 points
6,876 views
0 votes
1 answer

What is the difference between CSS and SCSS?

CSS: Cascading Style Sheets (CSS) is a ...READ MORE

answered Jun 17 in CSS by Edureka
• 8,460 points
7 views
0 votes
1 answer

Set cellpadding and cellspacing in CSS?

For controlling "cellpadding" in CSS, you can ...READ MORE

answered Jun 10 in CSS by Edureka
• 8,460 points
9 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP