Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,205,004 members, 7,990,778 topics. Date: Friday, 01 November 2024 at 01:04 AM |
Nairaland Forum / Science/Technology / Programming / I Want To Build Websites All By Myself (7761 Views)
Teach People To Build Websites And Apps And Earn Money / I Build Websites And Mobile Apps / Please Help, I Want To Learn To Build Websites, Web Design... (2) (3) (4)
(1) (2) (3) (4) (5) (Reply) (Go Down)
Re: I Want To Build Websites All By Myself by eesyy(m): 6:57am On Oct 08, 2020 |
AIlahuAkbar: Where are you having problems? |
Re: I Want To Build Websites All By Myself by eesyy(m): 8:37pm On Oct 08, 2020 |
*CSS─ FONTS* This chapter teaches you how to set fonts of a content, available in an HTML element. You can set the following font properties of an element: The font-family property is used to change the face of a font, possible values could be any font family name. The font-style property is used to make a font italic or oblique, possible values are normal, italic and oblique. The font-variant property is used to create a small-caps effect, possible values are normal and small-caps. The font-weight property is used to increase or decrease how bold or light a font appears; it provides the functionality to specify how bold a font is. Possible values could be normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900. The font-size property is used to increase or decrease the size of a font i.e. control the size of fonts. Possible values could be xx-small, xsmall, small, medium, large, x-large, xx-large, smaller, larger, size in numbered pixels, centimetres, or %. The font property is used as shorthand to specify a number of other font properties. Below is a complete example uploaded - self-explanatory. Powered by Programmers Community... 3 Shares
|
Re: I Want To Build Websites All By Myself by geektechlife: 8:55am On Oct 09, 2020 |
*CSS─ TEXT* This chapter of our lessons teaches you how to manipulate text using CSS properties. You can set the following text properties of an element: The color property is used to set the color of a text. The direction property is used to set the text direction, possible values could be rtl (i.e. from right to left) or ltr (i.e. from left to right). The letter-spacing property is used to add or subtract space between the letters that make up a word. The word-spacing property is used to add or subtract space between the words of a sentence. The text-indent property is used to indent the text of a paragraph, specifies the indentation of the first line of a text. The text-align property is used to align the text of a document. The text-decoration property is used to underline, overline, and line-through text. The text-transform property is used to capitalize text or convert text touppercase or lowercase letters. The white-space property is used to control the flow and formatting of text, possible values could be normal, nowrap, pre, pre-line, pre-wrap, initial, inherit. The text-shadow property is used to set the text shadow around a text. The line-height property is used to specify the space between lines. *Set the Text Color, Text Cases and Text Shadow* The example below demonstrates how to set the text color, text case and shadow around a text. Possible value for text color could be any color name in any valid format.Possible values for text cases are none, capitalize, uppercase, lowercase. Setting text shadow may not be supported by all the browsers. *Set the Text Alignment and Decorating the Text* The example also shows how to align a text and decorate a text. Possible values for alignment are left, right, center, justify. Possible values for decoration are none,underline, overline, line-through, blink. <!DOCTYPE html> <html> <head> <title>HTML CSS</title> </head> <body> <p style="color: blue; word-spacing: 10px;">This text will have a blue colour and word-spacing.</p><br/> <p style="direction: rtl;">This text prints from right to left.</p><br/> <p style="letter-spacing: 12px; line-height: 2.5;">This text has letter-spacing and line-height of 2.5.</p><br/> <p style="text-align: right; text-transform: capitalize;">This text will be right aligned and capitalized.</p><br/> <p style="text-align: center; text-transform: uppercase;">This text will be center aligned and set to uppercase.</p><br/> <p style="text-align: left; text-decoration: overline;">This text will be left aligned and have an overline.</p><br/> <p style="text-decoration: underline; text-indent: 40px;">This text will be underlined and indented 40px.</p><br/> <p style="text-decoration: line-through; text-shadow: 3px 2px 2px red;">This text will be striked through and with a shadow.</p> </body> </html> Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by geektechlife: 7:29pm On Oct 09, 2020 |
*CSS─ IMAGES* Images play an important role in any webpage. Though it is not recommended to include a lot of images, but it is still important to use good images wherever required. CSS plays a good role to control image display. You can set the following image properties using CSS. 1) The border property is used to set the width of an image border. This property can have a value in length or in %. A width of zero pixels means no border. 2) The height property is used to set the height of an image. It can have a value in length or in %. 3) The width property is used to set the width of an image. This property can have a value in length or in %. 4) The -moz-opacity property is used to set the opacity of an image. This property is used to create a transparent image in Mozilla. Internet Exporer uses filter:alpha(opacity=x) to create transparent images. In Mozilla (-moz-opacity:x), x can be a value from 0.0 - 1.0. A lower value makes the element more transparent (the same things goes for the CSS3-valid syntax opacity:x). In Internet Explorer (filter:alpha(opacity=x)), x can be a value from 0 - 100. A lower value makes the element more transparent. Newer browsers however allow 'opacity'. 5) The border-radius property can be used to set radius for the borders, to make round borders and circle images. To make circle images, set both the width and height to the same value, then border-radius to 50% or 50em. While giving value in %, it applies in respect of the box in which an image is available. Here is an example with the results shown in the uploaded image below: <!DOCTYPE html> <html> <head> <title>HTML CSS</title> </head> <body> <img style="border: 1px solid red; height: 500px; width: 500px; border-radius: 50%;" src="image.jpg"/> <img src="image.jpg" style="height: 500px; width: 500px; opacity: 0.4; filter: alpha(opacity=40);" /> </body> </html> Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by Sologzy(m): 4:51pm On Oct 10, 2020 |
am still learning FORM... very interesting.. |
Re: I Want To Build Websites All By Myself by eesyy(m): 8:04am On Oct 11, 2020 |
Sologzy: Yea. It is. |
Re: I Want To Build Websites All By Myself by geektechlife: 2:05pm On Oct 11, 2020 |
*CSS─ LINKS* This chapter of our lessons teaches you how to set different properties of a hyper link using CSS. You can set the following properties of a hyperlink: The :link signifies unvisited hyperlinks. The :visited signifies visited hyperlinks. The :hover signifies an element that currently has the user's mouse pointer hovering over it. The :active signifies an element on which the user is currently clicking. Usually, all these properties are kept in the header part of the HTML document. Remember a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective. Also, a:active MUST come after a:hover in the CSS definition as follows: <style type=”text/css”> a:link {color: #000000} a:visited {color: #006600} a:hover {color: #FF00CC} a:active {color: #FF00CC} </style> Now, we will see how to use these properties to give different effects to hyperlinks. *Set the Color of Links, Visited Links, Links On Mouse Over and Active Links* The following example demonstrates how to set the link color, color of the visited link, change the color of links when we bring a mouse pointer over that link and change the color of the active links. Possible values could be any color name in any valid format. Example: <!DOCTYPE html> <html> <head> <title>HTML CSS</title> <style type="text/css"> div {background-color: yellow; padding-left: 21%; font-size: 40px;} a:link {text-decoration: none; padding: 12px; color: #000000;} a:visited {color: #006600;} a:hover {color: #FF00CC; background-color: white;} a:active {color: #FF00CC;} </style> </head> <body> <div> <a href="index.html"> Home </a> <a href="messages.html"> Messages </a> <a href="contact.html"> Contact </a> </div> </body> </html> The html document above is a file named "index.html", which is the Home page as you can see in the home link of page. Aside it, are two other links to two different pages: one named "messages.html", the other "contact.html" for both Messages and Contact pages respectively. Each of these two pages will also have the same code as the one written above for the Home page and all located in the same folder in order for those links to work. They will all therefore produce the same result as seen in the image uploaded below. Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by geektechlife: 2:54pm On Oct 11, 2020 |
*CSS─ TABLES 1* This chapter of our lessons teaches you how to set different properties of an HTML table using CSS. You can set the following properties of a table: The border-collapse specifies whether the browser should control the appearance of the adjacent borders that touch each other or whether each cell should maintain its style. The border-spacing specifies the width that should appear between table cells. The caption-side captions are presented in the <caption> element. By default, these are rendered above the table in the document. You use the caption-side property to control the placement of the table caption. The empty-cells specifies whether the border should be shown if a cell is empty. The table-layout allows browsers to speed up the layout of a table by using the first width properties it comes across for the rest of a column rather than having to load the whole table before rendering it. Now, we will see how to use these properties with examples. *The border-collapse Property* This property can have two values: collapse and separate. By default, it is set to separate. Try using both values for this example: <!DOCTYPE html> <html> <head> <title>HTML CSS</title> <style type="text/css"> table.one {border-collapse: collapse;} td.a { border-style: dotted; border-width: 3px; border-color: #000000; padding: 10px; } td.b {border-style: solid; border-width: 3px; border-color: #333333; padding: 10px; } </style> </head> <body> <table class="one"> <caption>Collapse Border Example</caption> <tr> <td class="a"> Cell A Collapse Example</td> <td class="a"> Cell B Collapse Example</td> </tr> <tr> <td class="b"> Cell C Collapse Example</td> <td class="a"> Cell D Collapse Example</td> </tr> </table> </body> </html> The first image uploaded below shows the result of using separate which is also the default, the second image shows the result of using collapse. Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by geektechlife: 7:50pm On Oct 12, 2020 |
*CSS─ TABLES 2* *The border-spacing Property* The border-spacing property specifies the distance that separates the adjacent cells' borders. It can take either one or two values; these should be units of length. If you provide one value, it applies to both vertical and horizontal borders. Or you can specify two values, in which case, the first refers to the horizontal spacing and the second to the vertical spacing: NOTE: Unfortunately, this property does not work in Netscape 7 or IE 6. <style type="text/css"> /* If you provide one value */ table.example {border-spacing:10px;} /* This is how you can provide two values */ table.example {border-spacing:10px 15px;} </style> Now let's modify the previous example and see the effect: <!DOCTYPE html> <html> <head> <title>HTML CSS</title> <style type="text/css"> table.one { border-collapse: separate; width: 900px; border-spacing: 10px; } table.two { border-collapse: separate; width: 900px; border-spacing: 10px 50px; } caption { font-weight: bold; } </style> </head> <body> <table class="one" border="1"> <caption>Separate Border Example with border-spacing 100px all sides</caption> <tr> <td> Cell A Collapse Example</td> <td> Cell B Collapse Example</td> <td> Cell C Collapse Example</td> </tr> <tr> <td> Cell D Collapse Example</td> <td colspan="2"> Cell E Collapse Example</td> </tr> </table> <br /> <table class="two" border="1"> <caption>Separate Border Example with border-spacing with 10px top & bottom, 50px right & left</caption> <tr> <td> Cell A Collapse Example</td> <td> Cell B Collapse Example</td> <td> Cell C Collapse Example</td> </tr> <tr> <td> Cell D Collapse Example</td> <td colspan="2"> Cell E Collapse Example</td> </tr> </table> </body> </html> Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by geektechlife: 8:21pm On Oct 12, 2020 |
CSS─ TABLES 3* *The empty-cells Property* The empty-cells property indicates whether a cell without any content should have a border displayed. This property can have one of the three values - show, hide, or inherit. Here is the empty-cells property used to hide borders of empty cells in the <table> element. <!DOCTYPE html> <html> <head> <title>HTML CSS</title> <style type="text/css"> table.empty { width: 350px; border-collapse: separate; empty-cells: hide; } td.empty { padding: 5px; border-style: solid; border-width: 1px; border-color: #999999; } </style> </head> <body> <table class="empty"> <tr> <th></th> <th>Title one</th> <th>Title two</th> </tr> <tr> <th>Row Title</th> <td class="empty">value</td> <td class="empty">value</td> </tr> <tr> <th>Row Title</th> <td class="empty">value</td> <td class="empty"></td> </tr> </table> </body> </html> Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by geektechlife: 11:53pm On Oct 12, 2020 |
*CSS─ TABLES 4* *The table-layout Property* The table-layout property is supposed to help you control how a browser should render or lay out a table. This property can have one of the three values: fixed, auto, or inherit. The following example shows the difference between these properties. NOTE: This property is not supported by many browsers, so do not rely on this property. <!DOCTYPE html> <html> <head> <title>HTML CSS</title> <style type="text/css"> table.auto { table-layout: auto } table.fixed { table-layout: fixed } </style> </head> <body> <table class="auto" border="1"> <tr> <th></th> <th>Title one</th> <th>Title two</th> </tr> <tr> <th>Row Title</th> <td>value</td> <td>value</td> </tr> <tr> <th>Row Title</th> <td>value</td> <td></td> </tr> </table> <br/><br/> <table class="fixed" border="1"> <tr> <th></th> <th>Title one</th> <th>Title two</th> </tr> <tr> <th>Row Title</th> <td>value</td> <td>value</td> </tr> <tr> <th>Row Title</th> <td>value</td> <td></td> </tr> </table> </body> </html> Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by Dayvidblue: 8:14pm On Oct 14, 2020 |
This is what I have been able to do so far, I think I understand how HTML and CSS works, can't wait for you to delve into JAVASCRIPT, although I will wait patiently for the sake of others. Keep up the good work 2 Likes
|
Re: I Want To Build Websites All By Myself by eesyy(m): 10:20pm On Oct 14, 2020 |
Dayvidblue: That's great work, really. Encouraging! |
Re: I Want To Build Websites All By Myself by eesyy(m): 10:21pm On Oct 14, 2020 |
*CSS─ BORDERS 1* Border: The border properties allow you to specify how the border of the box representing an element should look. There are three properties of a border you can change: The border-color specifies the color of a border. The border-style specifies whether a border should be solid, dashed line, double line, or one of the other possible values. The border-width specifies the width of a border. Now, we will see how to use these properties with examples. *The border-color Property* The border-color property allows you to change the color of the border surrounding an element. You can individually change the color of the bottom, left, top and right sides of an element's border using the properties: border-bottom-color changes the color of bottom border. border-top-color changes the color of top border. border-left-color changes the color of left border. border-right-color changes the color of right border. The following example shows the effect of all these properties: <!DOCTYPE html> <html> <head> <title> CSS Borders </title> <style type="text/css"> p.example1{ border:1px solid; border-bottom-color:#009900; /* Green */ border-top-color:#FF0000; /* Red */ border-left-color:#330000; /* Black */ border-right-color:#0000CC; /* Blue */ } p.example2 { border:1px solid; border-color:#009900; /* Green */ } </style> </head> <body> <p class="example1"> All borders in different colors. </p> <p class="example2"> All borders in one color. </p> </body> </html> *The border-style Property* The border-style property allows you to select one of the following styles of border: none: No border. (Equivalent of border-width:0 solid: Border is a single solid line. dotted: Border is a series of dots. dashed: Border is a series of short lines. double: Border is two solid lines. groove: Border looks as though it is carved into the page. ridge: Border looks the opposite of groove. inset: Border makes the box look like it is embedded in the page. outset: Border makes the box look like it is coming out of the canvas. hidden: Same as none, except in terms of border-conflict resolution for table elements. You can individually change the style of the bottom, left, top, and right borders of an element using the following properties: border-bottom-style changes the style of bottom border. border-top-style changes the style of top border. border-left-style changes the style of left border. border-right-style changes the style of right border. The following example shows all these border styles: <!DOCTYPE html> <html> <head> <title> CSS Borders </title> </head> <body> <p style="border-width: 4px; border-style: solid;"> This is a solid border. </p> <p style="border-width: 4px; border-style: dashed;"> This is a dashed border. </p> <p style="border-width: 4px; border-style: double;"> This is a double border. </p> <p style="border-width: 4px; border-style: groove;"> This is a groove border. </p> <p style="border-width: 4px; border-style: ridge"> This is a ridge border. </p> <p style="border-width: 4px; border-style: inset;"> This is a inset border. </p> <p style="border-width: 4px; border-style: outset;"> This is a outset border. </p> <p style="border-width: 4px; border-style: hidden;"> This is a hidden border. </p> <p style="border-width:4px; border-top-style: solid; border-bottom-style: dashed; border-left-style: groove; border-right-style: double;"> This is a a border with four different styles. </p> </body> </html> See the results uploaded below. Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by OGWILLS123: 10:46pm On Oct 14, 2020 |
Dayvidblue:Nice ! one, Please which app are you using :O meanwhile you never see Css this is just introducction you never jam animation and flex. good job |
Re: I Want To Build Websites All By Myself by OGWILLS123: 10:51pm On Oct 14, 2020 |
eesyy:Am impresse by what you are doing here Nice job Waiting for JavaScript class, please quote me when you are about to start. thanks 1 Like |
Re: I Want To Build Websites All By Myself by Dayvidblue: 7:12am On Oct 15, 2020 |
OGWILLS123: I use both sublime text and and an writer |
Re: I Want To Build Websites All By Myself by OGWILLS123: 2:46pm On Oct 15, 2020 |
Dayvidblue:please can you tell me how to set up and run both of them i have sublime text Can i use it without an writer Please just explain everything in summary thanks |
Re: I Want To Build Websites All By Myself by Dayvidblue: 2:58pm On Oct 15, 2020 |
OGWILLS123: You don't need to have both, you can use either. It is very straight forward, just open sublime text on your phone, a list of options will come up on the left, this includes; new file, open, click on new file and you are good to go. When you are done coding remember to save your file by clicking on the menu option at the top right corner. |
Re: I Want To Build Websites All By Myself by OGWILLS123: 5:05pm On Oct 15, 2020 |
Dayvidblue:Any way thanks Am deleting sublime text right away, How can i be coding and the thing go just dey like you are writing normal text no color nothing nothing I will try my hands on anwritter modified: rate my work guys file:///storage/emulated/0/Android/data/com.kibou.sublime/files/animate.html |
Re: I Want To Build Websites All By Myself by OGWILLS123: 5:45pm On Oct 15, 2020 |
AIlahuAkbar:hahaha you never enter programming you don dey complain this one nah just web structure and styling |
Re: I Want To Build Websites All By Myself by eesyy(m): 5:58pm On Oct 15, 2020 |
CSS─ BORDERS 2* *The border-width Property* The border-width property allows you to set the width of an element borders. The value of this property could be either a length in px, pt, or cm, or it should be set to thin, medium, or thick. You can individually change the width of the bottom, top, left, and right borders of an element using the following properties: border-bottom-width changes the width of bottom border. border-top-width changes the width of top border. border-left-width changes the width of left border. border-right-width changes the width of right border. The following example show all these border width: <!DOCTYPE html> <html> <head> <title>CSS BORDERS</title> </head> <body> <p style="border-width:4px; border-style:solid;"> This is a solid border whose width is 4px. </p> <p style="border-width:4pt; border-style:solid;"> This is a solid border whose width is 4pt. </p> <p style="border-width:thin; border-style:solid;"> This is a solid border whose width is thin. </p> <p style="border-width:medium; border-style:solid;"> This is a solid border whose width is medium; </p> <p style="border-width:thick; border-style:solid;"> This is a solid border whose width is thick. </p> <p style="border-bottom-width:4px;border-top-width:10px;border-left-width: 2px;border-right-width:15px;border-style:solid;"> This is a border with four different width.</p> </body> </html> Result shown in first image uploaded below. *Border Properties Using Shorthand* The border property allows you to specify color, style, and width of lines in one property: The following example shows how to use all the three properties into a single property. This is the most frequently used property to set border around any element. <!DOCTYPE html> <html> <head> <title>CSS BORDERS</title> </head> <body> <p style="border:4px ridge red;"> This example is showing shorthand property for border. </p> <p style="border:medium dashed #889;"> This example is showing shorthand property for border. </p> </body> </html> Result shown in second image uploaded below. Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by Dayvidblue: 8:36pm On Oct 15, 2020 |
OGWILLS123: We can't rate your work cos it can only be viewed on your device. Kindly share a screen shot. If I were you I wouldn't delete my sublime text, I'll keep both. For a start you can't copy and paste on anwriter, also you can only view your page on the app if you are using an writer but sublime text gives you the option of viewing your pages on a browser of your choice. P.S My sublime text displays codes in colors, I wonder why yours doesn't. 1 Like |
Re: I Want To Build Websites All By Myself by geektechlife: 9:51am On Oct 16, 2020 |
*CSS─ MARGINS* The margin property defines the space around an HTML element; you can say the from the element border to any other surrounding elements. It is possible to use negative values to overlap content. The values of the margin property are not inherited by the child elements. Remember that the adjacent vertical margins (top and bottom margins) will collapse into each other so that the distance between the blocks is not the sum of the margins, but only the greater of the two margins or the same size as one margin if both are equal. We have the following properties to set an element margin. 1) The margin specifies a shorthand property for setting the margin properties in one declaration. 2) The margin-bottom specifies the bottom margin of an element. 3) The margin-top specifies the top margin of an element. 4) The margin-left specifies the left margin of an element. 5) The margin-right specifies the right margin of an element. Now, we will see how to use these properties with examples. *The Margin Property* The margin property allows you to set all of the properties for the four margins in one declaration. Here is an example: <!DOCTYPE html> <html> <head> <title>CSS MARGINS</title> </head> <body> <p style="margin: 15px; border:1px dotted black;"> all four margins will be 15px. </p> <br/> <p style="margin:10px 2%; border:1px outset black;"> top and bottom margin will be 10px, left and right margin will be 2% of the total width of the document. </p> <br/> <p style="margin: 10px 2% -10px; border:1px solid black;"> top margin will be 10px, left and right margin will be 2% of the total width of the document, bottom margin will be -10px. </p> <br/> <p style="margin: 10px 2% -10px auto; border:1px dashed black;"> top margin will be 10px, right margin will be 2% of the total width of the document, bottom margin will be -10px, left margin will be set by the browser. </p> </body> </html> You'd notice that when there is just one value, all sides use it. When there are two values, top and bottom use the first, right and left use the second. With three values, the top take the first, right and left take the second, leaving the third value as bottom margin. And when the values are four, first goes for top, second goes for right, third goes for bottom, last goes for left. That is it runs in a clockwise direction. This applies also for padding. *The margin-bottom, margin-top, margin-left and margin-right Properties* The margin-bottom property allows you to set the bottom margin of an element. The margin-top property allows you to set the top margin of an element. The margin-left property allows you to set the left margin of an element. The margin-right property allows you to set the right margin of an element. There can each have a value in length, %, or auto. Here is an example: <!DOCTYPE html> <html> <head> <title>CSS MARGINS</title> </head> <body> <p style="margin-bottom: 15px; border:4px outset black;"> This is a paragraph with a specified bottom margin. </p> <br/> <p style="margin-top: 5%; border:4px solid black;"> This is a paragraph with a specified top margin in percent. </p> <br/> <p style="margin-left: 15px; border:4px inset black;"> This is a paragraph with a specified left margin. </p> <br/> <p style="margin-right: 5%; border:4px ridge black;"> This is a paragraph with a specified right margin in percent. </p> </body> </html> See results accordingly in first and second images uploaded below. Powered by Programmers Community... 1 Like 2 Shares
|
Re: I Want To Build Websites All By Myself by OGWILLS123: 7:45pm On Oct 16, 2020 |
geektechlife:Nice one 1 Like |
Re: I Want To Build Websites All By Myself by geektechlife: 2:06pm On Oct 17, 2020 |
*CSS─ PADDINGS* The padding property allows you to specify how much space should appear between the content of an element and its border. The value of this attribute should be either a length, a percentage, or the word inherit. If the value is inherit, it will have the same padding as its parent element. If a percentage is used, the percentage is of the containing box. The following CSS properties can be used to control lists. You can also set different values for the padding on each side of the box using the following properties: 1) The padding-bottom specifies the bottom padding of an element. 2) The padding-top specifies the top padding of an element. 3) The padding-left specifies the left padding of an element. 4)The padding-right specifies the right padding of an element. 5) The padding serves as shorthand for the preceding properties. Now, we will see how to use these properties with examples. *The padding-bottom, padding-top, padding-left and padding-right Properties* The padding-bottom property sets the bottom padding (space) of an element. The padding-top property sets the top padding (space) of an element. The padding-left property sets the left padding (space) of an element. The padding-right property sets the right padding (space) of an element. These can each take a value in terms of length or %. Here is an example: <!DOCTYPE html> <html> <head> <title>CSS PADDINGS</title> </head> <body> <p style="padding-bottom: 15px; border:1px solid black;"> This is a paragraph with a specified bottom padding</p> <br/> <p style="padding-top: 5%; border:1px solid black;">This is a paragraph with a specified top padding in percent</p> <br/> <p style="padding-left: 15px; border:1px solid black;"> This is a paragraph with a specified left padding</p> <br/> <p style="padding-right: 5%; border:1px solid black;"> This is a paragraph with a specified right padding in percent</p> </body> </html> *The Padding Property* The padding property sets the left, right, top and bottom padding (space) of an element. This can take a value in terms of length or %. Here is an example: <!DOCTYPE html> <html> <head> <title>CSS PADDINGS</title> </head> <body> <p style="padding: 15px; border:1px solid black;"> all four padding will be 15px </p> <br/> <p style="padding:10px 2%; border:1px solid black;"> top and bottom padding will be 10px, left and right padding will be 2% of the total width of the document. </p> <br/> <p style="padding: 10px 2% 10px; border:1px solid black;"> top padding will be 10px, left and right padding will be 2% of the total width of the document, bottom padding will be 10px </p> <br/> <p style="padding: 10px 2% 10px 10px; border:1px solid black;"> top padding will be 10px, right padding will be 2% of the total width of the document, bottom padding and top padding will be 10px </p> </body> </html> Results are shown in the images uploaded below. Check the examples on margin. See how padding works different from margin? Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by geektechlife: 4:25pm On Oct 17, 2020 |
*CSS─ LISTS 1* Lists are very helpful in conveying a set of either numbered or bulleted points. You will learn how to control list type, position, style, etc., using CSS. We have the following five CSS properties, which can be used to control lists: 1) The list-style-type allows you to control the shape or appearance of the marker. 2) The list-style-position specifies whether a long point that wraps to a second line should align with the first line or start underneath the start of the marker. 3) The list-style-image specifies an image for the marker rather than a bullet point or number. 4) The list-style serves as shorthand for the preceding properties. 5) The marker-offset specifies the distance between a marker and the text in the list. Now we will see how to use these properties with examples. *The list-style-type Property* The list-style-type property allows you to control the shape or style of a bullet point (also known as a marker) in case of unordered lists and the style of numbering characters in ordered lists. Here are the values, which can be used for an unordered list: 1) none - gives no marker. 2) disc - (default) gives a filled-in circle. 3) circle - gives an empty circle. 4) square - gives a filled-in square. Here are the values, which can be used for an ordered list: 1) decimal - gives a number marker e.g "1". 2) decimal-leading-zero - gives a number marker with a preceding zero e.g "01". 3) lower-alpha - gives an alphabet marker in lowercase e.g "a". 4) upper-alpha - gives an alphabet marker in uppercase e.g "A". 5) lower-roman - gives a Roman numeric marker in lowercase e.g "i". 6) upper-roman - gives a Roman numeric marker in uppercase e.g "I". Here is an example, and the result shown in the image uploaded below: <!DOCTYPE html> <html> <head> <title>CSS LISTS</title> </head> <body style="padding: 10px;"> <h1> UNORDERED LISTS </h1> <ul style="list-style-type: none;"> <li>Maths</li> <li>Social Science</li> </ul> <br/> <ul style="list-style-type: disc;"> <li>Maths</li> <li>Social Science</li> </ul> <br/> <ul style="list-style-type: circle;"> <li>Maths</li> <li>Social Science</li> </ul> <br/> <ul style="list-style-type: square;"> <li>Maths</li> <li>Social Science</li> </ul> <br/> <h1> ORDERED LISTS </h1> <ol style="list-style-type: decimal;"> <li>Maths</li> <li>Social Science</li> </ol> <br/> <ol style="list-style-type: lower-alpha;"> <li>Maths</li> <li>Social Science</li> </ol> <br/> <ol style="list-style-type: upper-alpha;"> <li>Maths</li> <li>Social Science</li> </ol> <br/> <ol style="list-style-type: lower-roman;"> <li>Maths</li> <li>Social Science</li> </ol> <br/> <ol style="list-style-type: upper-roman;"> <li>Maths</li> <li>Social Science</li> </ol> </body> </html> Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by geektechlife: 3:47pm On Oct 18, 2020 |
CSS─ LISTS 2* *The list-style-image Property* The list-style-image allows you to specify an image so that you can use your own bullet style. The syntax is similar to the background-image property with the letters url starting the value of the property followed by the URL in brackets. If it does not find the given image then default bullets are used. Here is an example: <!DOCTYPE html> <html> <head> <title>CSS LISTS</title> </head> <body style="padding: 10px;"> <h1> UNORDERED LIST </h1> <ul> <li style="list-style-image: url(let.jpeg);">Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <h1> ORDERED LIST </h1> <ol> <li style="list-style-image: url(let.jpeg);">Maths</li> <li>Social Science</li> <li>Physics</li> </ol> </body> </html> *The list-style Property* The list-style allows you to specify all the list properties into a single expression. These properties can appear in any order. *The marker-offset Property* The marker-offset property allows you to specify the distance between the marker and the text relating to that marker. Its value should be a length as shown in the following example. Unfortunately, this property is not supported in IE 6 or Netscape 7. Here is the example: <!DOCTYPE html> <html> <head> <title>CSS LISTS</title> </head> <body style="padding: 10px;"> <h1> UNORDERED LIST </h1> <ul style="list-style: inside square; marker-offset: 2em;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <h1> ORDERED LIST </h1> <ol style="list-style: outside upper-alpha; marker-offset: 2cm;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> </body> </html> Result is shown in the image uploaded below. Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by eesyy(m): 5:14pm On Oct 19, 2020 |
*CSS─ DIMENSIONS 1* You have seen the border that surrounds every box i.e. element, the padding that can appear inside each box, and the margin that can go around them. Now you will learn how to change the dimensions of boxes. We have the following properties that allow you to control the dimensions of a box. The line-height property is used to set the height of a line of text. The height property is used to set the height of a box. The width property is used to set the width of a box. The max-height property is used to set a maximum height that a box can be. The min-height property is used to set the minimum height that a box can be. The max-width property is used to set the maximum width that a box can be. The min-width property is used to set the minimum width that a box can be. *The line-height Property* The line-height property allows you to increase the space between lines of text. The value of the line-height property can be a number, a length, or a percentage. *The Height and Width Properties* The height and width properties allow you to set the height and width for boxes. They can take values of a length, a percentage, or the keyword 'auto'. Here is an example with the result shown in the image uploaded below. <!DOCTYPE html> <html> <head> <title> CSS DIMENSIONS </title> </head> <body style="padding: 10px;"> <p style="border: 1px solid red; padding: 5px; margin: 10px;"> This paragraph has no set width, height or line height. <br/> See its difference from the next paragraph. </p> <p style="width: 400px; height: 100px; border: 1px solid red; padding: 5px; margin: 10px; line-height: 30px;"> This paragraph is 400 pixels wide and 100 pixels high and here line height is 30 pixels. </p> </body> </html> Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by eesyy(m): 8:10pm On Oct 19, 2020 |
*CSS─ DIMENSIONS 2* *The max-height Property* The max-height property allows you to specify the maximum height of a box. The value of the max-height property can be a number, a length, or a percentage. Here is an example: <!DOCTYPE html> <html> <head> <title> CSS DIMENSIONS </title> </head> <body style="padding: 10px;"> <p style="width: 400px; max-height: 10px; border: 1px solid red; padding: 5px; margin: 10px;"> This paragraph is 400px wide and max height is 10px. <br/> This paragraph is 400px wide and max height is 10px. <br/> This paragraph is 400px wide and max height is 10px. </p> <img alt="logo" src="fg.png" width="100px" height="100px" /> </body> </html> *The min-height Property* The min-height property allows you to specify the minimum height of a box. The value of the min-height property can be a number, a length, or a percentage. Here is an example: <!DOCTYPE html> <html> <head> <title> CSS DIMENSIONS </title> </head> <body style="padding: 10px;"> <p style="width: 400px; min-height: 200px; border: 1px solid red; padding: 5px; margin: 10px;"> This paragraph is 400px wide and min height is 200px. <br/> This paragraph is 400px wide and min height is 200px. <br/> This paragraph is 400px wide and min height is 200px. </p> <img alt="logo" src="fg.png" width="100px" height="100px" /> </body> </html> *The max-width Property* The max-width property allows you to specify the maximum width of a box. The value of the max-width property can be a number, a length, or a percentage. Here is an example: <!DOCTYPE html> <html> <head> <title> CSS DIMENSIONS </title> </head> <body style="padding: 10px;"> <p style="max-width: 100px; height:200px; border:1px solid red; padding: 5px; margin: 10px;"> This paragraph is 200px high and max width is 100px. <br/> This paragraph is 200px high and max width is 100px. <br/> This paragraph is 200px high and max width is 100px. </p> <img alt="logo" src="fg.png" width="100px" height="100px" /> </body> </html> *The min-width Property* The min-width property allows you to specify the minimum width of a box. The value of the min-width property can be a number, a length, or a percentage. Here is an example: <!DOCTYPE html> <html> <head> <title> CSS DIMENSIONS </title> </head> <body style="padding: 10px;"> <p style="min-width: 400px; height: 100px; border: 1px solid red; padding: 5px; margin: 10px;"> This paragraph is 100px high and min width is 400px. <br/> This paragraph is 100px high and min width is 400px. <br/> This paragraph is 100px high and min width is 400px. </p> <img alt="logo" src="fg.png" width="100px" height="100px" /> </body> </html> These four properties do not work in either Netscape 7 or IE 6. Results for the 4 examples are shown in the images uploaded below accordingly. Powered by Programmers Community... 2 Shares
|
Re: I Want To Build Websites All By Myself by eesyy(m): 2:21pm On Oct 20, 2020 |
*CSS─ SCROLLBARS* There may be a case when an element's content might be larger than the amount of space allocated to it. For example, the given width and height properties do not allow enough room to accommodate the content of the element. CSS provides a property called overflow, which tells the browser what to do if the box's contents is larger than the box itself. This property can take one of the following values: visible - Allows the content to overflow the borders of its containing element. hidden - The content of the nested element is simply cut off at the border of the containing element so it can not be seen, and no scrollbar is visible. scroll - The size of the containing element does not change, but the scrollbars are added to allow the user to scroll to see the content. auto - The purpose is the same as scroll, but the scrollbar will be shown only if the content does overflow. Here is an example: <!DOCTYPE html> <html> <head> <title> CSS SCROLLBARS </title> <style type="text/css"> .visible, .hidden, .scroll, .auto { display: block; border: 1px solid red; padding: 5px; margin-top: 5px; width: 300px; height: 50px; } .visible { overflow: visible; } .hidden { overflow: hidden; } .scroll { overflow: scroll; } .auto { overflow: auto; } </style> </head> <body style="padding: 10px;"> <p>Example of visible value:</p> <div class="visible">I am going to keep lot of content here just to show you how scrollbars works if there is an overflow in an element box. This provides your horizontal as well as vertical scrollbars. </div><br/> <p>Example of hidden value:</p> <div class="hidden">I am going to keep lot of content here just to show you how scrollbars works if there is an overflow in an element box. This provides your horizontal as well as vertical scrollbars. </div><br/> <p>Example of scroll value:</p> <div class="scroll">I am going to keep lot of content here just to show you how scrollbars works if there is an overflow in an element box. This provides your horizontal as well as vertical scrollbars. </div><br/> <p>Example of auto value:</p> <div class="auto">I am going to keep lot of content here just to show you how scrollbars works if there is an overflow in an element box. This provides your horizontal as well as vertical scrollbars. </div> </body> </html> *The overflow-y and overflow-x Properties* You can set different overflow values for vertical and horizontal axis of an element. To set for vertical, use overflow-y; for horizontal, use overflow-x. Here is an example: <!DOCTYPE html> <html> <head> <title> CSS SCROLLBARS </title> <style type="text/css"> .vertical { display: block; border: 1px solid red; padding: 5px; margin-top: 5px; width: 300px; height: 50px; overflow-y: auto; } .horizontal { display: block; border: 1px solid red; padding: 5px; margin-top: 5px; width: 300px; height: 50px; overflow-x: scroll; } </style> </head> <body style="padding: 10px;"> <p>Example of overflow-y value:</p> <div class="vertical">I am going to keep lot of content here just to show you how scrollbars works if there is an overflow in an element box. This shows vertical overflow. </div><br/> <p>Example of overflow-x value:</p> <div class="horizontal">I am going to keep lot of content here just to show you how scrollbars works if there is an overflow in an element box. This shows horizontal overflow. </div> </body> </html> Results are shown below in the uploaded images accordingly. Powered by Programmers Community... 2 Shares
|
Web Development Using ASP / Hi Devs, See What I Won (New Survey) / Are There Any Christian Coders/programmers?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 139 |