Line 9: | Line 9: | ||
</script> | </script> | ||
<style> | <style> | ||
− | + | #body { /*About the freeze part in the whole, backgroun color*/ | |
− | + | background-color: #E8E5D2; | |
− | + | width: 1263px; | |
− | + | margin-left: auto; | |
− | + | margin-right: auto; | |
+ | } | ||
+ | |||
+ | |||
+ | /*Logo picture as a whole, use to eliminate margin*/ | ||
+ | #logo p { | ||
+ | margin: 0px; | ||
+ | } | ||
+ | |||
+ | /*basically same with the top, but use div id=logo, let it float right, margin on right and top*/ | ||
+ | #logo { | ||
+ | float: left; | ||
+ | height: 95px; | ||
+ | width: 120px; | ||
+ | background-color: #E8E5D2; | ||
+ | margin-left: 20px; | ||
+ | } | ||
+ | |||
+ | /*this is about div id=comic: take the top banner as a whole to eliminate the margin*/ | ||
+ | #comic { | ||
+ | margin: 0px; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* Actually this make the navigation bar bigger and better*/ | ||
+ | #nav { | ||
+ | margin: 0 0 0 0; | ||
+ | padding: 10px; | ||
+ | padding-top:20px; | ||
+ | padding-bottom:20px; | ||
+ | |||
+ | } | ||
+ | |||
+ | /*place the first line 'inline', and the interval to be 20px*/ | ||
+ | #nav ul li { | ||
+ | display: inline; | ||
+ | margin: 0 10px 0 10px; | ||
+ | } | ||
+ | #nav { | ||
+ | background-color: #E8E5D2; | ||
+ | } | ||
+ | |||
+ | #nav ul { | ||
+ | list-style-type: none; | ||
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | overflow: hidden; | ||
+ | background-color: #E8E5D2; | ||
+ | border-bottom: solid black 2px; | ||
+ | } | ||
+ | |||
+ | #nav li { | ||
+ | float: left; | ||
+ | } | ||
+ | |||
+ | |||
+ | #nav li a, .dropbtn { | ||
+ | display: inline-block; | ||
+ | color: #404040; | ||
+ | text-align: center; | ||
+ | padding: 14px 16px; | ||
+ | text-decoration: none; | ||
+ | |||
+ | } | ||
+ | |||
+ | #nav li a:hover, #nav .dropdownlist:hover .dropbtn { | ||
+ | color:blue; | ||
+ | |||
+ | } | ||
+ | |||
+ | #nav li.dropdownlist { | ||
+ | display: inline-block; | ||
+ | } | ||
+ | |||
+ | #nav .dropdown_content { | ||
+ | display: none; | ||
+ | position: absolute; | ||
+ | background-color: #f9f9f9; | ||
+ | min-width: 160px; | ||
+ | box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); | ||
+ | z-index: 1; | ||
+ | } | ||
+ | |||
+ | #nav .dropdown_content a { | ||
+ | color: black; | ||
+ | padding: 12px 16px; | ||
+ | text-decoration: none; | ||
+ | display: block; | ||
+ | text-align: left; | ||
+ | } | ||
+ | |||
+ | #nav .dropdown_content a:hover { | ||
+ | background-color: #f1f1f1 | ||
+ | } | ||
+ | |||
+ | #nav .dropdownlist:hover .dropdown_content { | ||
+ | display: block; | ||
+ | } | ||
</style> | </style> |
Revision as of 09:50, 25 June 2017