css - HTML5 Issue with backround-image and accompanied float image above it. Also cannot adjust opacity. -
i coding website kids , assignment class. trying put image in body background having text on top of it. image did show floating box above mid page , not float right edge of page. including .css file. image file in same file else , there link file.
h1 { color: green; text-align: center; } h2 { color: green; text-align: center; } #header { height:100px; background:black; text-align: center; text color: green; } body { margin:0; padding:0; width:100%; height:1000px; margin:0; dislay:block; color: #000000; background-image:url('trees.jpeg') background-repeat: no-repeat; } #footer { height:50px; background:black; text color:green; text-align:left-side; } #content { height:1000px; } table { width:100%; height:500px; }
the link in page looks so
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="dio.css"> </head>
my homepage set differently entered information image straight page not linked. head.
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <style> #header { height:100px; background:green; } </style> <style> h1 { color:black; text-align: center; } </style> <style> h2 { color: green; text-align: center; } </style> <style> p { text color:blue; } </style> <style> #sidebar { width:10%; height:1000px; float:left; } </style> <style> #content { float:left; } </style> <style> #advertising { width:10%; height:1000px; float:right; } </style> <style> #footer { height:50px; text-align:center; background:green; text color:black; clear: both; } </style> <style> body { margin:0; padding:0; width:100%; height:1000px; margin:0; dislay:block; color: #000000; background-image:url('trees.jpeg') background-repeat: no-repeat; } </style> </head>
what doing wrong? researched issue have been trying different things no avail.
i see
@ end of background-image
property. try replacing semicolon.
also, homepage, can combine styles under 1 <style>
tag.
Comments
Post a Comment