To create a responsive design with a central dashboard and two side images linked to it, you can use the following HTML and CSS structure:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Dashboard</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f4f4f4;
}
.container {
display: flex;
flex-direction: row;
align-items: center;
max-width: 1200px;
width: 100%;
}
.side-image {
flex: 1;
text-align: center;
}
.dashboard {
flex: 2;
text-align: center;
background-color: #fff;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
img {
max-width: 100%;
height: auto;
cursor: pointer;
}
@media (max-width: 768px) {
.container {
flex-direction: column;
}
.side-image {
margin-bottom: 20px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="side-image">
<a href="dashboard-link-1.html"><img src="image1.jpg" alt="Side Image 1"></a>
</div>
<div class="dashboard">
<h1>Dashboard</h1>
<p>Your dashboard content goes here.</p>
</div>
<div class="side-image">
<a href="dashboard-link-2.html"><img src="image2.jpg" alt="Side Image 2"></a>
</div>
</div>
</body>
</html>
This code creates a responsive layout with a central dashboard and two side images that link to the dashboard. The layout adjusts for smaller screens by stacking the elements vertically.