M3- Using Bootstrap styles Flashcards

1
Q

What helps a website adapt to different screen sizes?

A

Bootstrap helps your website automatically adjust to different screen sizes, so it looks good on all devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does Bootstrap adapt website to different screens?

A

Bootstrap achieves this adaptability using CSS classes. These classes are like labels you can stick on your website elements (like text, buttons, images) to tell them how to behave.

These classes are built by Bootstrap developers who have already thought about thousands of different situations a website might encounter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are infixes in Bootstrap, and why are they important?

A

Infixes in Bootstrap are special instructions that you insert into CSS class names to tell Bootstrap how to adjust your website’s layout based on the screen size. They help your site automatically adapt to different devices by setting responsive breakpoints.

Infixes help you make your website responsive by adjusting to screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are responsive breakpoints, and how are they used in Bootstrap?

A

Responsive breakpoints are thresholds for different screen sizes where your website’s layout needs to change. Bootstrap uses these breakpoints to ensure your website looks good on any device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the different breakpoints (thresholds for different screen sizes)?

A
  • Extra small (less than 576 pixels): This is the default setting, no special label needed.
  • Small (576 pixels or more): Use the infix sm.
  • Medium (768 pixels or more): Use the infix md.
  • Large (992 pixels or more): Use the infix lg.
  • Extra Large (1200 pixels or more): Use the infix xl.
  • Extra Extra Large (1400 pixels or more): Use the infix xxl.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do I use these infixes in Bootstrap classes?

A

To use infixes, you add them to your CSS class names to specify the behavior at different screen sizes. For example, if you want an element to take up six columns on a large screen, you’d write:
< div class=”col-lg-6”>< /div>
Here, col is the base class for columns, lg is the infix for large screens, and 6 indicates the element should occupy six columns out of twelve.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are modifiers in Bootstrap, and how do they work?

A

Modifiers are like adjectives that change the appearance of Bootstrap components. They allow you to quickly customize the look of elements such as alerts, buttons, or text, based on the context (e.g., success, warning, error).

Modifiers change the appearance of elements based on context

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Can you give an example of how modifiers are used with Bootstrap components?

A

Let’s take Bootstrap’s alert component, which displays messages to users. The alert-primary class shows a blue alert:

< div class=”alert alert-primary”>This is a primary alert< /div>

If you want to change the alert color to red for an error message, you’d use the danger modifier:

< div class=”alert alert-danger”>This is a danger alert< /div>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are some common modifiers available in Bootstrap?

A
  • primary: Blue (used for general information).
  • secondary: Grey.
  • success: Green (used for success messages).
  • info: Light blue (used for informational messages).
  • warning: Yellow (used for warnings).
  • danger: Red (used for errors or critical messages).
  • light: Light grey.
  • dark: Dark grey or black.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do infixes and modifiers save time when designing a website?

A

Infixes ensure your layout automatically adjusts to different screen sizes without needing to redesign for each device. Modifiers let you quickly change the appearance of elements based on context (like changing a message from a general alert to an error). Together, they allow you to build responsive, visually consistent websites much faster.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly