|
17 | 17 | text-align: center; |
18 | 18 | color: #333; |
19 | 19 | font-size: 36px; |
| 20 | + margin-top: 20px; /* Added margin to separate title from navbar */ |
| 21 | + margin-bottom: 20px; /* Reduced bottom margin for better balance */ |
20 | 22 | } |
21 | 23 |
|
22 | 24 | .content { |
|
32 | 34 | text-decoration: none; |
33 | 35 | font-size: 18px; |
34 | 36 | border-radius: 5px; |
| 37 | + text-align: center; /* Center the text and image */ |
| 38 | + transition: background-color 0.3s ease; /* Smooth hover transition */ |
| 39 | + max-width: 400px; /* Limit the width of the button */ |
| 40 | + margin: 0px auto; /* Center the button and provide margin */ |
35 | 41 | } |
36 | 42 |
|
37 | 43 | a:hover { |
|
45 | 51 | margin-top: 20px; |
46 | 52 | } |
47 | 53 |
|
48 | | - /* Make the image bigger */ |
| 54 | + /* Make the image and text fit together */ |
| 55 | + .image-link { |
| 56 | + display: flex; |
| 57 | + flex-direction: column; /* Stack the text and image vertically */ |
| 58 | + align-items: center; /* Center align both image and text */ |
| 59 | + justify-content: center; |
| 60 | + } |
| 61 | + |
49 | 62 | .image-link img { |
50 | | - width: 600px; |
| 63 | + width: 100%; /* Adjust image width */ |
| 64 | + max-width: 420px; /* Increase image size by 40% (previously 300px) */ |
51 | 65 | height: auto; |
52 | 66 | cursor: pointer; |
53 | | - max-width: 100%; /* Ensure image doesn't overflow */ |
| 67 | + } |
| 68 | + |
| 69 | + .image-link span { |
| 70 | + font-size: 18px; |
| 71 | + color: white; |
| 72 | + margin-top: 10px; /* Add space between image and text */ |
54 | 73 | } |
55 | 74 |
|
56 | 75 | /* Mobile Responsiveness */ |
|
105 | 124 |
|
106 | 125 | <h1>Welcome to My Apps</h1> |
107 | 126 | <div class="content"> |
108 | | - <p><a href="minerals.html" target="_blank">Mineral locator for the state of Michigan</a></p> |
109 | | - <!-- Image link to Mineral Finder --> |
| 127 | + <!-- Single button for Mineral Locator --> |
110 | 128 | <a href="minerals.html" class="image-link" target="_blank"> |
111 | 129 | <img src="Mineral Finder.png" alt="Mineral Finder"> |
| 130 | + <span>Mineral Locator for Michigan</span> |
| 131 | + </a> |
| 132 | + |
| 133 | + <!-- Single button for Chemical Visualizer --> |
| 134 | + <a href="ChemicalVisualization.HTML" class="image-link" target="_blank"> |
| 135 | + <img src="Chemical Visualizer.png" alt="Chemical Visualizer"> |
| 136 | + <span>Chemical Visualizer</span> |
112 | 137 | </a> |
113 | 138 | </div> |
114 | 139 | </body> |
|
0 commit comments