Positioning in CSS allows you to display your element wherever you want on the screen

But when I was learning it, I found it little bit confusing๐Ÿ˜…

So in this thread I'll try to explain it in easiest manner with practical implementation. Let's start

THREAD๐Ÿงต๐Ÿ‘‡

There are 5 values that you can pass in position property

- static
- relative
- absolute
- fixed
- sticky

In this thread we will be focusing on relative and absolute positioning as both are widely used
Let's start with understanding what document flow is?

๐Ÿ“Œ Elements are displayed on the screen as they written in the HTML document

Consider the following piece of code:

H1, P, H3 and div are displayed on the screen in exact order as they written in the HTML file.
As now you know about document flow, let's start with Relative positioning

๐Ÿ“Œ Relative Position

- Relative positioning do not take an element out of document flow
- Relative positioning is relative to element's original position which can be changed using offset
๐Ÿ”น Relative position is relative to itself.

For example: Consider the code and output in the attached image below

As you can see red box is shifted 100px from left because I applied left offset after giving it relative positioning
In the attached image below, the black dotted area would be the original position of red box if I don't apply position relative in it.

As you can see it proved that relative position is relative to itself
So now let me shift the blue box 100px towards left. So how can I do that? it's simple

.blue {
position: relative;
right: 100px;
}

Notice here that document flow is as it is. So the relative position does not affect the document flow
๐Ÿ“Œ Absolute Position

- The element is removed from the normal document flow
- You can consider it as, after applying absolute position the element will no longer in the flow and no space is created for the element in the page layout
For example:

If I apply absolute position in the red box, then the red box will be out of the flow and hence no space will be allocated to it.

See the image below, red box is out of flow and hence yellow box is at top and followed by green and blue

* Yellow box is below red
- The absolute position of an element is relative to its closest ancestor, which has some position property.

Consider the code below, Red is the parent div and black is the child div. In this particular case, body is the parent of red div
Now let me apply relative position to red(parent) div and absolute position to black(child) div.

As I mentioned absolute position is relative to closest ancestor having some position property
Let's understand it in little more details๐Ÿ‘‡

Consider this piece of code.

Here green div is a parent of red and red div is a parent of black
So let me apply position property in green and black. In black div we have absolute position so in that case black div will be relative to green not red

Because here black's closest ancestor is green which has some position property
I think that's pretty much it for this thread. I hope you get a overview of CSS positioning

This may sound a bit confusing but try to play with code. You'll be able to build better understanding๐Ÿ˜„

Feel free to post your doubts belowโค๏ธ

More from Pratham ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿš€

5 great background websites for every web developer and designer

๐Ÿงต๐Ÿ‘‡


1. Magic pattern

Beautiful pure CSS background patterns that you can actually use in your projects. They are highly customizable as well.

๐Ÿ–‡๏ธ
https://t.co/ZqczrPfkdZ


2. Cool backgrounds

Collection of cool backgrounds that you can add to blogs, websites, or as desktop and phone wallpapers

๐Ÿ–‡๏ธ https://t.co/df7VSb9t8H


3. Gradienta

Use pure CSS gradient backgrounds for your next website or app, as a JPG image or CSS code, no attribute required

๐Ÿ–‡๏ธ https://t.co/R58zrwpZCH


4 Mesh gradient

Creat aurora UI like gradients using few simple clicks

๐Ÿ–‡๏ธ https://t.co/vOHHDASr1V
5 amazing websites that will blow the mind of a developer. Definitely check them out

๐Ÿงต๐Ÿ‘‡๐Ÿป

1๏ธโƒฃ Animation generator

- Dead simple visual tools to help you generate CSS for your projects.

๐Ÿ”—
https://t.co/IFmIEgDiVY


2๏ธโƒฃ Neural Network Visualizer

- Deep playground is an interactive visualization of neural networks, written in TypeScript using d3.js.

๐Ÿ”— https://t.co/mTAlFbJsOW


3๏ธโƒฃ Blockchain Demo

- A visual demo of blockchain technology

๐Ÿ”— https://t.co/I1RwxYcM1Z


4๏ธโƒฃ Developer Roadmaps

- Step by step guides and paths to learn different tools or technologies

๐Ÿ”— https://t.co/VSNPdG8jQR

More from Tech

One of the best decisions I made during a very turbulent 2020 was to leave conventional coding behind and embrace the #nocode movement. @bubble made this a reality. Although my own journey thus far is premature, Iโ€™ve learned a lot so hereโ€™s a power thread on....


โ€˜How I created @buildcamp sales funnel landing page in under 2hoursโ€™.

Preview here ๐Ÿ‘‡

https://t.co/s9P5JodSHe

Power thread here ๐Ÿ‘‡

1. Started with a vanilla bubble app ensuring that all styles and UI elements were removed. Created a new page called funnel and set the page size to 960px as this allows the page to render proportionately on both web and mobile when hitting responsive breakpoints.


2. Began dropping elements onto the page to โ€˜find the styleโ€™. These had to be closely aligned to our @buildcamp branding so included text, buttons and groups - nothing too heavy. Played around with a few fonts, colors and gradients and thus pinned down the following style guide.


3. Started to map out sections using groups as my โ€˜containersโ€™ to hold the relevant information and imagery needed to pad out the sales pitch. At this point, they were merely blocks of color #ff6600 with reduced opacity set to 5% to ease page flair.

You May Also Like

๐™Ž๐™๐™–๐™ง๐™ž๐™ฃ๐™œ ๐™ข๐™ฎ ๐™ฌ๐™ž๐™จ๐™™๐™ค๐™ข ๐‘พ๐’๐’'๐’• ๐’ƒ๐’† ๐’”๐’–๐’“๐’‘๐’“๐’Š๐’”๐’†๐’… ๐’Š๐’‡ ๐’•๐’๐’Ž๐’๐’“๐’“๐’๐’˜ ๐’– ๐’“๐’†๐’‚๐’… ๐’•๐’‰๐’† ๐’”๐’‚๐’Ž๐’† ๐’”๐’•๐’–๐’‡๐’‡ ๐’Š๐’ 50๐’Œ ๐’˜๐’๐’“๐’Œ๐’”๐’‰๐’๐’‘ ๐’๐’“ ๐’”๐’๐’Ž๐’†๐’๐’๐’† ๐’Ž๐’‚๐’๐’‚๐’ˆ๐’Š๐’๐’ˆ ๐’š๐’๐’–๐’“ ๐’Ž๐’๐’๐’†๐’š ๐’˜๐’Š๐’•๐’‰ ๐’”๐’‚๐’Ž๐’† ๐’๐’๐’ˆ๐’Š๐’„
Simple and effective way 2 make Money


Idea 1:- Use pivot level like 14800 in case of nifty and sell 14800straddle monthly expiry (365+335) exit if nifty closes on daily basis below S1 or above R1

After closing below S1 if it closes above S1 next day or any day enter the same position again vice versa for R1

Idea2:- Use R1 and S1 corresponding strikes multiple
Incase of R1 15337 take 15300ce
N in case of S1 14221 use 14200pe
Sell both and hold till expiry or exit if nifty closes below S1 or above R1 around closing
If the same bounces above S1 and falls below R1 re-enfer same strikes

Use same criteria for nifty, usdinr and banknifty

(This is must)Use this margin rule for 1lot banknifty pair keep 4Lax margin
For nifty one lot keep 3Lax
For usdinr 100lots keep 4Lax

I bet you if you do this on consistent basis your ROI will be more than 70% on yearly basis.

Couldn't explain easier than this

Criticisms are most welcomed.
1

From today, we will memorize the names of 27 Nakshatras in Vedic Jyotish to never forget in life.

I will write 4 names. Repeat them in SAME sequence twice in morning, noon, evening. Each day, revise new names + recall all previously learnt names.

Pls RT if you are in.

2

Today's Nakshatras are:-

1. Ashwini - เค…เคถเฅเคตเคฟเคจเฅ€

2. Bharani - เคญเคฐเคฃเฅ€

3. Krittika - เค•เฅƒเคคเฅเคคเคฟเค•เคพ

4. Rohini - เคฐเฅ‹เคนเคฟเคฃเฅ€

Ashwini - เค…เคถเฅเคตเคฟเคจเฅ€ is the FIRST Nakshatra.

Repeat these names TWICE now, tomorrow morning, noon and evening. Like this tweet if you have revised 8 times as told.

3

Today's Nakshatras are:-

5. Mrigashira - เคฎเฅƒเค—เคถเคฟเคฐเคพ

6. Ardra - เค†เคฐเฅเคฆเฅเคฐเคพ

7. Punarvasu - เคชเฅเคจเคฐเฅเคตเคธเฅ

8. Pushya - เคชเฅเคทเฅเคฏ

First recall previously learnt Nakshatras twice. Then recite these TWICE now, tomorrow morning, noon & evening in SAME order. Like this tweet only after doing so.

4

Today's Nakshatras are:-

9. Ashlesha - เค…เคถเฅเคฒเฅ‡เคทเคพ

10. Magha - เคฎเค˜เคพ

11. Purvaphalguni - เคชเฅ‚เคฐเฅเคตเคพเคซเคพเคฒเฅเค—เฅเคจเฅ€

12. Uttaraphalguni - เค‰เคคเฅเคคเคฐเคพเคซเคพเคฒเฅเค—เฅเคจเฅ€

Purva means that comes before (P se Purva, P se pehele), and Uttara comes later.

Read next tweet too.

5

Purva, Uttara prefixes come in other Nakshatras too. Purva= pehele wala. Remember.

First recall previously learnt 8 Nakshatras twice. Then recite those in Tweet #4 TWICE now, tomorrow morning, noon & evening in SAME order. Like this tweet if you have read Tweets #4 & 5, both.
First thread of the year because I have time during MCO. As requested, a thread on the gods and spirits of Malay folk religion. Some are indigenous, some are of Indian origin, some have Islamic


Before I begin, it might be worth explaining the Malay conception of the spirit world. At its deepest level, Malay religious belief is animist. All living beings and even certain objects are said to have a soul. Natural phenomena are either controlled by or personified as spirits

Although these beings had to be respected, not all of them were powerful enough to be considered gods. Offerings would be made to the spirits that had greater influence on human life. Spells and incantations would invoke their


Two known examples of such elemental spirits that had god-like status are Raja Angin (king of the wind) and Mambang Tali Arus (spirit of river currents). There were undoubtedly many more which have been lost to time

Contact with ancient India brought the influence of Hinduism and Buddhism to SEA. What we now call Hinduism similarly developed in India out of native animism and the more formal Vedic tradition. This can be seen in the multitude of sacred animals and location-specific Hindu gods
Nano Course On Python For Trading
==========================
Module 1

Python makes it very easy to analyze and visualize time series data when youโ€™re a beginner. It's easier when you don't have to install python on your PC (that's why it's a nano course, you'll learn python...

... on the go). You will not be required to install python in your PC but you will be using an amazing python editor, Google Colab Visit
https://t.co/EZt0agsdlV

This course is for anyone out there who is confused, frustrated, and just wants this python/finance thing to work!

In Module 1 of this Nano course, we will learn about :

# Using Google Colab
# Importing libraries
# Making a Random Time Series of Black Field Research Stock (fictional)

# Using Google Colab

Intro link is here on YT: https://t.co/MqMSDBaQri

Create a new Notebook at https://t.co/EZt0agsdlV and name it AnythingOfYourChoice.ipynb

You got your notebook ready and now the game is on!
You can add code in these cells and add as many cells as you want

# Importing Libraries

Imports are pretty standard, with a few exceptions.
For the most part, you can import your libraries by running the import.
Type this in the first cell you see. You need not worry about what each of these does, we will understand it later.