Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

West Midlands Class 2 - Kawthar - HTMLCSS - Week 3 - #136

Closed
pddys wants to merge 1 commit into
CodeYourFuture:masterfrom
kwthr8:master
Closed

West Midlands Class 2 - Kawthar - HTMLCSS - Week 3#136
pddys wants to merge 1 commit into
CodeYourFuture:masterfrom
kwthr8:master

Conversation

@pddys

@pddys pddys commented Jan 27, 2021

Copy link
Copy Markdown

Your Details

  • Your Name:
  • Your City:
  • Your Slack Name:

Homework Details

  • Module:
  • Week:

@pddys pddys left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job. This is a complex layout to create and you've managed to develop it using some advanced CSS and some smart use of flexbox.

The things you could improve upon is trying to be dry with your HTML and CSS and let features inherent to CSS such as specificity and the cascade do the work for you. This means greater use of classes instead of IDs, and being a bit more selective about which HTML you add.

Generally though this is good work, and it's good to see that you've challenged yourself by looking at CSS beyond your curriculum such as CSS grid.

Comment thread index.html
</head>

<body>
<div style="display: flex; flex-direction: column; align-items: stretch; margin: 0 auto; width: 90%;">

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't really want to mix inline css with external css

Comment thread index.html
<body>
<div style="display: flex; flex-direction: column; align-items: stretch; margin: 0 auto; width: 90%;">
<div id="firstrow">
<img src="https://www.clipartkey.com/mpngs/m/162-1624572_cake-logo-design-png.png" alt="cake logo" />

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see alt text

Comment thread index.html

</div>

<div class="carousel">

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this class name from another website? It's described as a carousel but in this case it's a fixed image.

A carousel would be closer to something like this: https://ganlanyuan.github.io/tiny-slider/demo/

Comment thread index.html
<img src="https://www.crazyforcrust.com/wp-content/uploads/2020/05/chocolate-cake-recipe-9.jpg" />
</div>
<div class="slices">
<div>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need this empty div? You might have been able to lose it to keep your HTML drier

Comment thread index.html
</div>
</div>
</div>
<div style="align-self: center; width: 100%; ">

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, it's better to stick with external css rather than inline css and this can be hard to override as inline css has a lot of specificity.

Comment thread style.css
color: darkblue;
}
.content{
display: grid;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now this is pretty advanced CSS. Well done.

Comment thread style.css
.slices img{
width: 90%;
height: 90%;
/* object-fit: cover; */

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property should maybe have stayed in as it's stops the images from stretching to fill the space.

Comment thread style.css
width: 100%;
}

@media screen and (min-width:333px)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see a media query, although the smaller device that you'd probably design for is the iPhone 5 which is 320px wide. So something like 400px might encompass a greater range of devices.

Comment thread style.css
{

.content{
grid-template-columns: 40% 60%;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good way to create layouts. Using media queries & grid.

Comment thread style.css
}

/* 660 max */
@media screen and (min-width: 448px)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What layout effects are these media queries having?

Since the cakes container is already wrapping with flex-wrap, it's generally working responsively already.

@github-actions

Copy link
Copy Markdown

Your coursework submission has been closed because nobody has interacted with it in six weeks. You are welcome to re-open it to get more feedback.

@github-actions github-actions Bot added the Stale label May 14, 2021
@github-actions github-actions Bot closed this May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants