Today we are going to discuss about the Align How can you align your content or elements using CSS you know very well about the text align center text align your center for suppose if you want to align your image to center page, or you can also align your things using the positioning using the position property. And you can also use many techniques available in the CSS for suppose now I am saying that I have something I have come in the quarter, you can easily get to the core. Now I'm saying if you want to align a div, so how can you do that? I'm saying this is the div. I'm saying class. And my div one, make sure I have some content inside there.
I'm saying my panda here. And now you can call this dip in your seat is fine. Call this tip here. Now I'm seeing that the properties are using margin, auto. And I'm seeing the second properties border to pixel solid red. Okay?
Then go to the page refresh the page. So now as you can see, it's showing you at the left align. So I'm saying the worth is written for suppose 50 person. Go to the page, refresh the page. Now as you can see, you are setting a particular Dave at center. So this is a technique one and how can you align your paragraphs you don't really well if you have a paragraph single paragraph you want to set this the center I'm seeing this is my simple para.
So now I have to say that class, okay? Now I'm saying I'm going to give this class I'm saying my simple you can also use anything you want. So now I'm saying this is my data. Dog class and this is my data. I'm saying text align, and the value is center. So this is a property and this is a center.
This is a property and this is a way Okay, now go to the page, refresh the page and as you can see, showing you at the center so it's totally depend upon you. And if you have an image for suppose you have an image, I'm saying that I have image. Let me show you an image. I'm saying I have image in the source file. In the assets, I have logo dot png image inside. Now I'm seeing I have the class my image.
Now I'm seeing that here, I have to define the image. Make sure this is the image. Okay, now I'm saying the image is this, I'm saying display, block, display block property and I'm saying margin left off art of miniature art oh and also I am saying margin right ardal the page refresh the page. So now as you can see, I'm showing you at the center I'm saying with also is 50. Does a page refresh the page now as you can see, you are showing your logo or your image at the center, you can also define your div by using the positioning for suppose if you have a day and now i'm saying is your day and you have a class, my dear to my disco. And you have a paragraph I'm sorry that they now call this my div to styling.
Here I'm saying position absolute. This is the absolute. I'm saying from the, this is the border, one pixel solid red. And now I'm saying that the right side is 00 pixel. Refresh the page. So now as you can see, you are showing your div at the right side by default Left side, okay, so in this way you can also define your element.
So now I'm saying for suppose I have another div for copy this bad boy is this bad boy here and change just for class. Okay, third class. Now one thing, I want to set this by using a float, make sure you can change the alignment using the floor. property. Now I'm saying that float equals two, right make sure it's a property and this is the value. And now I'm seeing the word is the word is 200.
And I have a border, one pixel solid red. Make sure you can Okay, page. Now as you can see you are showing at the right side, make sure because you're using the absolute class for this element. So that's why it's showing you like this. I'm going to add comment for this, refresh the page. Now as you can see, it's showing you and like this kit, now I'm going to use my data brought cash flow.
Now, in this way you can align your content we have a lot of techniques or we have a lot of properties by using. By using that properties. You can align your content or align your divs align your paragraphs, centers left, right so it's totally depend upon you. So go to the internet and Just as there's something or play with them so thank you for watching