Figma To Real Website | Responsive Homepage | HTML, CSS & JavaScript | Part 7

GTCoding
22 Dec 202114:54

Summary

TLDRThis tutorial series guides viewers through the process of transforming a design into a functional website. The focus of the video is on developing the 'Get Our App' section and the footer using HTML, CSS, and JavaScript. The instructor demonstrates how to center align content, style buttons, and adjust spacing based on the Figma design. They also cover the customization of individual elements, such as text and input fields, and the layout of the footer with a dark background, grid layout for links, and social media icons. The video concludes with styling the submit button and copyright text, ensuring a cohesive design that matches the initial Figma blueprint.

Takeaways

  • 🌐 The tutorial series focuses on converting a Figma design into a functional website using HTML, CSS, and JavaScript.
  • 🎨 Progress has been made on designing the hero section, testimonial section, and hour courses section of the website.
  • 📲 The current video's goal is to design the 'Get Our App' section and the footer of the website.
  • 🔨 HTML and CSS are the primary tools used for coding the website, with Figma serving as the design reference.
  • 📝 CSS is used to style elements such as text alignment, button layout, and individual button properties like padding and background color.
  • 🔍 Figma's design details, including spacing and colors, are meticulously copied into the CSS for accurate styling.
  • 🖌️ The 'Get Our App' section buttons are styled to be visually appealing with center alignment, padding, and a minimum width.
  • 🔲 The footer is styled with a dark background color and white text, creating a contrast with the rest of the website.
  • 🔗 Anchor tags within the footer are styled to remove underlines and change the text color to white for consistency.
  • 📚 The footer's layout is organized into columns using CSS grid, with varying column widths to accommodate different content areas.
  • 📝 The footer also includes styled social media icons, an input field, and a submit button, all positioned and styled according to the Figma design.

Q & A

  • What is the main focus of the tutorial series mentioned in the transcript?

    -The main focus of the tutorial series is to convert a sigma design into a real website using HTML, CSS, and JavaScript.

  • Which sections of the website have been designed in the progress mentioned in the script?

    -The hero section, testimonial section, and the hour courses section have been designed in the progress mentioned.

  • What sections are planned to be designed in the video covered by the transcript?

    -The 'Get Our App' section and the footer of the website are planned to be designed in the video.

  • How is the 'App Section' in the HTML document identified for styling purposes?

    -The 'App Section' is identified with a class named 'app-section' in the HTML document for styling purposes.

  • What CSS property is used to center align the content in the 'App Section'?

    -The 'text-align' property is used to center align the content in the 'App Section'.

  • What CSS layout model is used to place the buttons side by side in the 'App Section'?

    -The 'flex' layout model is used to place the buttons side by side in the 'App Section' by setting 'display: flex'.

  • What is the gap between the buttons in the 'App Section' as per the Figma design?

    -The gap between the buttons in the 'App Section' is 30 pixels as per the Figma design.

  • How is the text and image aligned vertically in the buttons?

    -The text and image are aligned vertically in the buttons by setting 'display: flex' and 'align-items: center' on the button's CSS.

  • What is the minimum width set for the buttons in the 'App Section'?

    -The minimum width set for the buttons in the 'App Section' is 310 pixels.

  • What color is used for the background of the footer as per the Figma design?

    -A dark color, specified by the 'var(--dark-color)' variable, is used for the background of the footer as per the Figma design.

  • How are the list items in the footer styled to remove the bullet points and add spacing?

    -The list items in the footer are styled by setting 'list-style: none' to remove bullet points, and 'margin: 16px top and bottom' for spacing.

  • What is the layout structure used for the footer links in the Figma design?

    -The layout structure used for the footer links is a grid layout with three columns, using 'grid-template-columns: 2fr 2fr 3fr'.

  • How is the submit button positioned in relation to the input field in the footer?

    -The submit button is positioned absolutely with 'right: 5px' and 'top: 50%', and then translated up by 50% of its height to center it vertically in relation to the input field.

  • What is the final touch added to the footer's copyright paragraph for styling?

    -The final touch added to the footer's copyright paragraph is a 'margin-top: 36px' to create spacing from the content above.

Outlines

00:00

🛠️ Designing the App Section and Footer

In this tutorial, the instructor demonstrates the process of converting a sigma design into a functional website using HTML, CSS, and JavaScript. The focus is on developing the 'Get Our App' section and the footer of the website. The hero section, testimonial section, and hour courses section have already been designed. The app section is styled with centered alignment and buttons are arranged side by side with a 30-pixel gap. Individual buttons are styled with padding, a black background, and white text, with text and image alignment in the center. The footer is styled with a dark background color, padding, and margin adjustments. Anchor tags within the footer are modified to remove underlines and change the text color to white.

05:02

✨ Styling Footer Components and Social Icons

This section continues the tutorial with detailed styling of the footer. The instructor sets the background color using a predefined variable and adjusts padding and margin for the footer element. The anchor tags' text color is set to white, and underlines are removed. Headings within the footer are styled with an orange color using a color variable. Bullets are removed from the unordered list, and list items are given a margin for better spacing. The footer is divided into three columns using CSS grid layout, with varying column widths to accommodate different sections. Social media icons are aligned with a margin and spacing between them, completing the footer's design.

10:04

✍️ Finalizing Footer with Input Field and Button Styling

The final part of the tutorial focuses on styling the input field and button within the footer. The form is aligned and given margins to match the design from the Figma file. The input field is styled with padding, border-radius, and set to full width, with borders removed. A submit button is positioned absolutely relative to the form, with adjustments made to center it vertically. The button is styled with a dark background, border-radius, padding, and border removal. Text styling for the button is also copied from the Figma design. Lastly, the copyright information is given a top margin for proper spacing, concluding the footer's styling.

Mindmap

Keywords

💡HTML

HTML, or HyperText Markup Language, is the standard markup language used for creating web pages. It defines the structure and layout of a webpage using a system of tags and attributes. In the video, HTML is used to create the structural elements of the 'Get Our App' section and the footer of the website, with classes and IDs that are targeted by CSS for styling purposes.

💡CSS

CSS, or Cascading Style Sheets, is a stylesheet language used for describing the presentation of a document written in HTML. It enables the separation of presentation and content, allowing for greater control over the look and formatting of web pages. In the video, CSS is used to style the 'App Section' and 'Footer' by setting properties such as 'text-align', 'display', 'padding', and 'margin' to achieve the desired visual layout and appearance.

💡JavaScript

JavaScript is a high-level, interpreted programming language commonly used for enhancing web pages with interactive elements. Although not explicitly mentioned in the script, it is often used alongside HTML and CSS to create dynamic and responsive web applications. The video focuses on the design aspect, but JavaScript could be used to add functionality to the sections being designed.

💡Figma

Figma is a cloud-based interface design tool and design collaboration platform. It allows designers to create, collaborate, and share designs easily. In the video, the Figma design serves as the blueprint for the website's sections, with the instructor referring to it to replicate the design in HTML and CSS.

💡Hero Section

The 'Hero Section' is a common term in web design referring to the introductory part of a webpage that makes a strong first impression. It typically includes a prominent image, headline, and call-to-action. In the script, the hero section has already been designed, indicating that it is part of the overall website layout.

💡Testimonial Section

A 'Testimonial Section' on a website is an area where customer reviews or endorsements are displayed. It helps build trust and credibility with potential customers. The script mentions that this section has been designed, suggesting that it is visually appealing and contains user feedback.

💡Hour Courses Section

The 'Hour Courses Section' likely refers to a part of the website showcasing courses or educational content that can be completed within an hour. It is mentioned in the script as another section that has been designed, indicating that the website may offer quick learning opportunities.

💡App Section

The 'App Section' is a specific area of the website being designed in the video. It is intended to promote the use of an application, possibly related to the website's services. The script details the styling of this section, including center alignment and button design.

💡Footer

A 'Footer' is the section at the bottom of a webpage that typically contains information such as copyright notices, contact information, and links to other pages. In the video, the footer is being styled with a dark background color, padding, and other design elements to enhance its appearance and functionality.

💡Styling

Styling in web design refers to the process of applying visual elements to the structure defined by HTML, using CSS. It includes setting properties like color, font, spacing, and layout. The script describes the styling process for various elements such as buttons, text, and the footer, to match the design from the Figma file.

💡Responsive Design

Responsive design is an approach to web design that makes web pages render well on different devices and screen sizes, from desktop computer monitors to mobile phones. Although not explicitly mentioned in the script, the process of designing with HTML and CSS inherently involves creating a responsive layout, especially when considering elements like the 'App Section' and 'Footer'.

Highlights

Introduction to the tutorial series on converting a sigma design into a real website using HTML, CSS, and JavaScript.

Progress update on the website design, including completion of the hero, testimonial, and hour courses sections.

Upcoming tasks to design the app section and the footer of the website.

Starting the design process by opening the source code and targeting the 'app section' class in CSS.

Center alignment of content within the app section for a balanced layout.

Styling the buttons side by side using flexbox properties in CSS.

Adding a 30-pixel gap between buttons as per the Figma design.

Individual button styling, including padding, background color, and text color.

Aligning text and image vertically within buttons using flexbox.

Setting a minimum width for buttons to match the design specifications.

Customizing text styles within buttons, adjusting font size and padding for better fit.

Styling the footer with a dark background color using a predefined CSS variable.

Adding padding and margin to the footer for spacing and separation from the app section.

Styling anchor tags within the footer to remove underlines and set text color to white.

Applying orange color to footer headings using a CSS variable.

Removing list bullets and adjusting padding and margins for list items in the footer.

Organizing footer links into three columns using CSS grid layout.

Styling social media icons with appropriate margins for alignment.

Designing the input field and submit button in the footer with specific styles and positioning.

Adding final touches to the footer, including margin adjustments for copyright information.

Completion of the 'Get Our App' section and footer design, wrapping up the tutorial.

Transcripts

play00:00

hi everybody welcome to gt coding in

play00:01

this tutorial series we are converting

play00:03

this sigma design into a real website

play00:05

using html css and javascript and let me

play00:08

open chrome and this is our progress as

play00:10

of now we have designed the hero section

play00:13

and the testimonial section and also the

play00:16

hour courses section

play00:18

now in this video we will design the app

play00:19

section and also the footer so if you go

play00:22

back to our figma design

play00:23

this is how it looks we have this get

play00:25

our app section and then we have the

play00:27

footer over here so let's get started

play00:30

[Music]

play00:35

all right here i'm in the source code so

play00:36

let's go to the html and here we can see

play00:39

for the app section we have this section

play00:40

with the class of app section

play00:42

so let's target that in our css so here

play00:45

in the css i'll just create a comment

play00:47

i'll just type app section

play00:49

and let's select the class over here so

play00:51

we have a class called app section

play00:53

and the first thing we will do is we

play00:55

will center align everything

play00:57

so here i'll just type text align and

play00:58

set it to center now let's go to our

play01:00

chrome and here we can see everything is

play01:02

center aligned all right the heading and

play01:04

the paragraph look alright so we need to

play01:06

style these buttons so let's go back to

play01:09

our figma file and here we can see both

play01:10

these buttons are one next to the other

play01:12

so let's go back to our

play01:14

html and here we can see for the buttons

play01:16

we have this division with the class of

play01:18

app buttons so let's target that

play01:20

so here i'll just type app section

play01:23

app buttons and we need to set the

play01:25

display to flex so that the items will

play01:27

be one next to the other and we'll also

play01:29

align items to the center and justify

play01:31

content to the center all right now

play01:33

let's go back to our figma file and

play01:34

let's see what is the gap between these

play01:36

buttons so if we double click over here

play01:38

and if you press option or alt we can

play01:41

see that we have a gap of 30 pixels

play01:44

so let's go back to our css and here we

play01:46

will type gap 30 pixels right now let's

play01:49

go back to our

play01:50

browser and here we can see we have both

play01:52

the buttons we'll also add some margin

play01:54

top for these buttons so i just add a

play01:56

margin top of

play01:58

24 pixels and i think that looks all

play02:00

right now let's style these individual

play02:02

buttons so if you go back to our html

play02:06

for each of the buttons we have a

play02:07

division of the class of app btn so

play02:09

let's target that

play02:11

so here i'll just tap app section

play02:13

app btn

play02:15

and let's go back to our figma file and

play02:17

let's see what are the styles so let's

play02:18

select one of these buttons let's go to

play02:20

inspect and here we can see we have a

play02:22

padding of 20 pixels and 31 pixels i'll

play02:26

just round it down to 30 pixels so i'll

play02:29

just copy this padding

play02:30

and let's go back and paste it over here

play02:33

and we have a background color of black

play02:35

so let's copy this

play02:37

and let's paste it over here

play02:39

right now let's go back to our browser

play02:41

and here we can see we have the buttons

play02:42

we'll also set the text color to white

play02:45

so just type color and set it to white

play02:48

now we want the image and the text to be

play02:50

center aligned vertically so let's go

play02:52

back and we will set the display to flex

play02:55

and we will align items to the center

play02:57

and let's go back and now we can see

play02:59

that

play03:00

the text and the image are aligned to

play03:02

the center vertically now let's add some

play03:04

gap between these two elements so let's

play03:06

go back to our figma file and let's

play03:09

double click over here let's see what's

play03:10

the gap we can see we have a gap of 14

play03:13

pixels

play03:16

so let's go back and here we will just

play03:18

type gap and set it to 14 pixels

play03:22

and let's go back to our figma file and

play03:24

here we can see we have a fixed width

play03:26

for these buttons

play03:28

so we have a width of 309 pixels i'll

play03:31

just round it to 310 pixels

play03:33

so let's go back and we will set a

play03:36

minimum width for this button so just

play03:38

type min width and set it to 310 pixels

play03:42

but now let's go back to our browser and

play03:44

now we can see we have these buttons

play03:46

displayed over here all right now let's

play03:47

style this text so let's go back to our

play03:50

figma file and let's double click on

play03:51

this text and let's go to inspect and

play03:54

let's scroll down

play03:55

and here we can see the css of the text

play03:57

so i'll just copy all of this and let's

play03:59

go back and go to our html and for the

play04:01

text we have a span so let's select the

play04:03

span so let's go back

play04:05

and here let's type app section app btn

play04:10

span

play04:11

and let's paste the css and i'll just

play04:14

remove this

play04:15

text align from here

play04:17

and also this comment

play04:19

and we also don't need to have this line

play04:21

height

play04:22

and let's remove the font style and

play04:24

we'll also add sans serif over here

play04:28

right now let's go back to our browser

play04:30

and now we can see we have the styles

play04:32

applied to the text i think the font

play04:34

size is a little bit too large for

play04:36

this button so let's go back

play04:39

and i'll just change the font size to 20

play04:41

pixels

play04:43

and i think we'll also decrease the

play04:46

padding a little bit

play04:48

so here i'll just add a padding of 16

play04:51

pixels top and bottom

play04:53

and now the button looks alright now you

play04:55

can go ahead and keep the same styling

play04:57

that you have over here in the figma

play04:58

file but i just felt like this looks

play05:01

better

play05:02

right now the next thing we will do is

play05:04

we will style this footer so let's go

play05:06

back to our figma file

play05:08

and here we can see for the footer we

play05:09

have the dark background color that we

play05:11

created so here we can see we have this

play05:14

color code

play05:15

and we have this color over here in the

play05:18

variables so this is the color right

play05:19

here so we're going to use this color

play05:21

for the background of the footer so

play05:23

let's go back to our html

play05:26

and here we can see we have this footer

play05:28

element so let's add a background color

play05:30

for this let's go back to our styloid

play05:32

css file

play05:33

and i'll just add a comment

play05:36

i'll just tap footer and here i'll just

play05:38

type

play05:39

footer

play05:41

and let's add a background color of the

play05:43

dark variable so if we scroll up

play05:46

we can see that we have already created

play05:47

this dark color variable so let's use

play05:50

this variable

play05:53

so here let's type var dark color

play05:57

and we'll also set the default text

play05:58

color to white

play06:00

right now let's go back to our browser

play06:03

and now the next thing we will do is we

play06:04

will add a padding top and padding

play06:06

bottom and we also need to have some

play06:07

margin between this app section and this

play06:10

footer

play06:11

so let's go back and

play06:13

we will have a margin top

play06:15

set to 100 pixels just like all the

play06:18

other sections

play06:19

and now let's go back to our figma file

play06:21

and let's see what is the padding so

play06:22

here we can see we have a padding top of

play06:24

70 pixels

play06:26

so let's go back and let's add the

play06:28

padding so i'll just have padding

play06:30

of 70 pixels top and bottom and 0 for

play06:33

left and right right now let's go back

play06:35

to our browser

play06:36

and now the next thing we will do is we

play06:38

will style this anchor tags

play06:40

so we need to change the color of the

play06:41

anchor tags and also remove the

play06:43

underlines so let's go back and

play06:46

let's target the anchor tags so i'll

play06:48

just have footer a

play06:50

and text decoration to none

play06:53

to get rid of the underlines and we'll

play06:55

set the color of the text to white

play06:58

all right now the next thing we will do

play06:59

is we will style these headings so for

play07:01

the headings we want to have a color of

play07:03

orange so let's go back to our html

play07:08

and here we can see for the headings we

play07:09

have an s3

play07:11

and we have already created a variable

play07:13

for the orange color so i'll just type

play07:14

footer s3

play07:17

and set the color to

play07:19

var

play07:20

orange color

play07:22

or that's it with the heading all right

play07:23

now the next thing we will do is we'll

play07:25

remove these bullets

play07:27

so for that let's target the

play07:29

ul so if you go back to our html

play07:32

we can see we have this ul over here so

play07:34

let's target that so here let's type

play07:37

footer ul and we will set the list style

play07:40

to none so this will remove the bullets

play07:43

and we'll also set a padding left of 20

play07:45

pixels

play07:46

right now let's go back to our browser

play07:49

and the next thing we will do is we will

play07:50

add some margin between each of these

play07:52

list items

play07:53

so let's go back and let's target the

play07:56

list items so i just have footer ulli

play07:59

and let's type margin 16 pixels top and

play08:03

bottom and zero for left and right right

play08:05

now the next thing we need to do is we

play08:06

need to set all these links one next to

play08:08

the other so if we go back to our figma

play08:10

file we can see there are three sections

play08:12

over here so let's go back

play08:14

and

play08:15

in our html we can see that we have

play08:18

a division of the class of

play08:20

links container so in the links

play08:22

container we have all these links so we

play08:24

have three divisions with the class of

play08:25

links

play08:28

so let's target this container division

play08:30

and we will set it as a display of grid

play08:34

so let's go back and here i'll just type

play08:36

footer

play08:37

links container

play08:39

and let's set the display to grid and

play08:41

now we can specify how many columns we

play08:43

need to have so let's type grid

play08:45

template columns

play08:47

now here we can set the width of the

play08:48

column by fractions so let's type 2fr

play08:50

for the first column

play08:52

2fr for the second column so both these

play08:54

columns will have the same width and for

play08:56

the last column we will have a little

play08:58

higher width so i'll just type 3fr over

play09:00

here

play09:01

right now let's go to our browser and

play09:02

now you can see we have these three

play09:04

columns over here

play09:05

now the next thing we will do is style

play09:07

these icons

play09:10

so we need to have some left margin for

play09:12

this icons it should be aligned with

play09:14

this

play09:15

email id over here so let's go back

play09:18

and for the social media icons we have a

play09:20

division with the class of social so

play09:22

let's target this here i'll just have

play09:24

footer

play09:25

social

play09:27

and let's set a margin left

play09:29

of

play09:30

20 pixels right now let's go back and we

play09:32

have the correct margin now we'll also

play09:34

have some gap between these two images

play09:36

so let's go back and let's

play09:38

select the images over here so we have

play09:41

anchor tags over here and in that we

play09:42

have the images so let's add some margin

play09:45

right so i'll just have footer

play09:47

social a

play09:49

and let's set a margin right of

play09:52

and let's go back to our figma file and

play09:54

let's see what is the margin

play09:56

so let's double click over here

play09:58

and we have a spacing of 28 pixels

play10:01

so let's go back to our css and here

play10:03

we'll just type 28

play10:07

or that looks all right

play10:08

right now the next thing we will do is

play10:10

style this input field and also this

play10:12

button so if you go back to our figma

play10:14

file this is how the input field and the

play10:16

button looks so the first thing we will

play10:18

do is we will set a margin left to this

play10:20

form to align itself with both these

play10:23

elements so let's go back and if you go

play10:25

to the html we can see that we have a

play10:27

form

play10:28

so let's target this form so

play10:31

here i'll just type footer form

play10:33

and we'll have a margin left of 20

play10:36

pixels

play10:37

and we'll also have some margin top

play10:39

so we'll have a margin top of

play10:42

16 pixels

play10:43

right now let's tile this input field so

play10:46

let's go back

play10:48

and

play10:48

let's tap footer

play10:50

form input

play10:52

and let's go back to our figma file and

play10:54

let's double click over here

play10:56

and let's go to the inspect and here we

play10:58

can see we have the styling for

play11:00

the text inside the input field so let's

play11:03

copy all of this

play11:05

and let's go back to our css and i'll

play11:08

just paste it over here

play11:09

and let's remove this

play11:11

comment and the font style

play11:14

and we'll also add sensitive over here

play11:19

now we also need to have a border radius

play11:21

for this input field so let's select

play11:23

this

play11:24

and here we can see we have a border

play11:25

radius of 8 pixels so let's go back and

play11:28

let's add that here i'll just have

play11:30

border radius

play11:32

of 8 pixels

play11:33

now let's go back to our browser

play11:36

and we'll also add some padding

play11:38

so

play11:39

we will add a padding of 8 pixels top

play11:42

and bottom and 32 pixels left and right

play11:46

and we'll also remove the border so

play11:47

let's go back and let's type border

play11:50

of none

play11:51

right now let's set the width of the

play11:53

input field to 100 percent

play11:55

so you start with

play11:56

100 percent and now we need to position

play11:58

this button over here on the right

play12:00

so for that let's set the position of

play12:02

this button to absolute and we'll

play12:04

position this button relative to this

play12:06

form so let's go back

play12:08

we will set the position of the form to

play12:09

relative so the star position

play12:12

relative

play12:13

and let's target the button so for the

play12:15

button we have this class of submit

play12:17

button so here i'll just type footer

play12:20

form

play12:21

submit

play12:22

button

play12:24

and let's set the position to absolute

play12:26

and we'll set the right position to 5

play12:28

pixels and we'll also set the top

play12:30

position to 50

play12:32

and now we can see that the button

play12:34

starts from the 50 mark so here we have

play12:36

to type transform translate y and set it

play12:39

to negative 50

play12:42

and now you can see that the button is

play12:43

exactly in the center now let's go back

play12:45

to our figma file and let's copy the

play12:47

styles for the button

play12:49

so let's double click on this button

play12:51

and here we can see we have the styles

play12:52

we have the dark color

play12:54

and we have a border radius of 8 pixels

play12:58

so let's go back and let's type

play13:00

background

play13:02

and we'll set it to var dark blue color

play13:05

and border radius of 8 pixels

play13:08

and we'll also add a padding of

play13:11

8 pixels top and bottom and 32 pixels

play13:13

left and right

play13:15

and we'll also remove the border

play13:17

right now let's style the text so let's

play13:20

go back to our figma file and let's

play13:22

double click on this text

play13:24

and here we can see we have the styles

play13:26

for the text

play13:27

so let's copy all of this

play13:29

and let's go back

play13:30

and i'll just paste it over here

play13:33

and let's remove the font

play13:35

style

play13:37

and we'll also add

play13:38

sensor if over here

play13:42

and we'll also remove this

play13:45

comment and this line height right now

play13:47

let's go back to our browser and now we

play13:49

can see we have the button correctly

play13:50

styled we'll also set the cursor to

play13:52

pointer so here let's type cursor

play13:55

pointer and now when you hover over this

play13:56

we have the cursor set to pointer

play13:59

all right now the last thing we will do

play14:00

is we will add some margin top for this

play14:02

copyright information so let's go back

play14:04

to our html and we can see we have a

play14:07

paragraph with the class of copyright so

play14:09

let's target that

play14:11

here i'll just type footer copyright and

play14:14

let's set a margin top of

play14:16

36 pixels and let's see how it looks and

play14:19

that looks all right

play14:20

so that's basically it with the footer

play14:22

of our website so in this video we have

play14:23

designed the get our app section and the

play14:26

footer so that's it for this video if

play14:28

you have any doubts you can ask in the

play14:29

comments below and if you like this

play14:30

video please click on the like button

play14:32

and subscribe to this channel to get the

play14:33

latest video updates thanks a lot for

play14:35

watching have a nice day

play14:39

[Music]

play14:53

bye

Rate This

5.0 / 5 (0 votes)

関連タグ
Web DevelopmentHTML CodingCSS StylingJavaScriptDesign ConversionWebsite BuildingTutorial SeriesFigma DesignResponsive LayoutCoding TutorialUI Development
英語で要約が必要ですか?