gpt-4-0125-preview· openai
Suzhen/CodeChat
Make a CSS for this redesign. Use code blocks, no comments, flexes and the color #447db7…
- User
Make a CSS for this redesign. Use code blocks, no comments, flexes and the color #447db7
- Assistant
To create a CSS stylesheet (
newstyle.css) for your provided HTML document focusing on a flexible design approach and using the color#447db7as requested, see the following example:/* Reset some basic styles */ body, h1, h2, p, ul, li { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Arial', sans-serif; line-height: 1.6; color: #333; background-color: #f4f4f4; } header { background-color: #447db7; color: #fff; padding: 20px 10px; text-align: center; } header img { max-width: 100px; margin-bottom: 10px; } h1 { margin-bottom: 10px; } ul { list-style-type: none; padding: 20px; } ul li { background: #fff; margin-bottom: 10px; padding: 10px; border-radius: 5px; } ul li a { color: #447db7; text-decoration: none; } ul li a:hover { text-decoration: underline; } p { padding: 0 20px; } h2 { color: #333; padding-left: 20px; } /* Flex styles */ body { display: flex; flex-direction: column; justify-content: flex-start; } ul { display: flex; flex-direction: column; gap: 10px; } @media screen and (min-width: 768px) { ul { flex-direction: row; flex-wrap: wrap; } ul li { flex: 1 1 calc(50% - 20px); /* adjust item width minus margin */ } } /* Link-specific styles */ small { display: block; margin-top: 5px; } small a { color: #447db7; } small a:hover { color: #335a86; /* Darken the color a bit on hover */ }