How Do you combine CSS code to an HTML code? I want to Combine them? -
can please copy , paste answer final code? image mapping code image hmtl, want add css shadow it.
here code:
<style> { -moz-box-shadow: 15px 15px 15px #888; -webkit-box-shadow: 15px 15px 15px #888; box-shadow: 15px 15px 15px #888; } </style>
and below html code need add css shadow code image in it:
<div style="text-align:center; width:1130px; auto; auto;"> <img id="image-maps_9201304191940558" src="http://images.mylot.com/userimages/images/postphotos/2080106.jpg" usemap="#image-maps_9201304191940558" border="0" width="1130" height="2808" alt="" /> <map id="_image-maps_9201304191940558" name="image-maps_9201304191940558"> <area shape="rect" coords="293,566,385,603" href="http://www..com/about" alt="about" title="about" /> <area shape="rect" coords="631,568,720,603" href="http://www..com/contact" alt="contact" title="contact" /> </map> </div>
so want combine codes together! asked on yahoo answers im asking here cause no 1 there.
thanks
the 'correct' method put css in 1 file , html in another, link css file <head>
section of html file (for many reasons, try maintain best practices, main reason code maintainability , reusability -- splitting these files, keep code more readable , maintainable yourself, , allow re-use css file in multiple html files).
for example:
index.html:
<html> <head> ... <link rel='stylesheet' type='text/css' href='styles.css'> </head> <body> <div id='stylediv'> <img id="image-maps_9201304191940558" src="http://images.mylot.com/userimages/images/postphotos/2080106.jpg" usemap="#image-maps_9201304191940558" border="0" width="1130" height="2808" alt="" /> <map id="_image-maps_9201304191940558" name="image-maps_9201304191940558"> <area shape="rect" coords="293,566,385,603" href="http://www.google.com/about" alt="about" title="about" /> <area shape="rect" coords="631,568,720,603" href="http://www.google.com/contact" alt="contact" title="contact" /> </map> </div> </body> </html>
styles.css:
#stylediv { text-align:center; width:1130px; margin: auto; -moz-box-shadow: 15px 15px 15px #888; -webkit-box-shadow: 15px 15px 15px #888; box-shadow: 15px 15px 15px #888; }
it permissible put styles in-line. put them in style=
attribute of <div>
tag above best practice.
note id
unique, if want apply above css multiple divs, instead use class=stylediv
, change #stylediv
in css .stylediv
.
Comments
Post a Comment