From ed96df3be4a6bbf14c54adbfb5711ee32aa26b92 Mon Sep 17 00:00:00 2001 From: The Coding Aviator <34807532+thecodingaviator@users.noreply.github.com> Date: Sat, 9 Mar 2019 19:37:39 +0530 Subject: [PATCH] Added solution to create visual balance challenge (#34304) * Update index.md * Added correct language * Update index.md --- .../index.md | 59 ++++++++++++++++++- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/guide/english/certifications/responsive-web-design/applied-visual-design/create-visual-balance-using-the-text-align-property/index.md b/guide/english/certifications/responsive-web-design/applied-visual-design/create-visual-balance-using-the-text-align-property/index.md index 1573a66d78..902d01c12b 100644 --- a/guide/english/certifications/responsive-web-design/applied-visual-design/create-visual-balance-using-the-text-align-property/index.md +++ b/guide/english/certifications/responsive-web-design/applied-visual-design/create-visual-balance-using-the-text-align-property/index.md @@ -1,10 +1,63 @@ --- title: Create Visual Balance Using the text-align Property --- + +![:triangular_flag_on_post:](https://forum.freecodecamp.com/images/emoji/emoji_one/triangular_flag_on_post.png?v=3 ":triangular_flag_on_post:") Remember to use **`Read-Search-Ask`** if you get stuck. Try to pair program ![:busts_in_silhouette:](https://forum.freecodecamp.com/images/emoji/emoji_one/busts_in_silhouette.png?v=3 ":busts_in_silhouette:") and write your own code ![:pencil:](https://forum.freecodecamp.com/images/emoji/emoji_one/pencil.png?v=3 ":pencil:") + ## Create Visual Balance Using the text-align Property -This is a stub. Help our community expand it. +## ![:speech_balloon:](https://forum.freecodecamp.com/images/emoji/emoji_one/speech_balloon.png?v=3 ":speech_balloon:") Hint -This quick style guide will help ensure your pull request gets accepted. +Use the `text-align` property. - +> _try to solve the problem now_ + +## Spoiler Alert! + +![warning sign](//discourse-user-assets.s3.amazonaws.com/original/2X/2/2d6c412a50797771301e7ceabd554cef4edcd74d.gif) + +**Solution ahead!** + +The following lines of code solves the challenge: +```html + +
+
+
+

Google

+

Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.

+
+ +
+
+``` + +### Code Explanation: + +* The `h4{}` selects the `h4` element. +* `text-align: center;` align the text in the `h4` to the center. +* The `p{}` selects the `p` element. +* `text-align: justify;` justifies the text in the `p`.