brown2005 Posted March 8, 2007 Share Posted March 8, 2007 i was wondering if the below was the best way of using css as i usually do my layouts with tables, so im just learning how to layout with css <style> body { margin: 0px; } #header { font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #627c10; text-decoration: none; margin-top: 10px; margin-bottom: 10px; } #image { margin-bottom: 5px; } #container { width: 100%; margin: 0px; background-color: #fff; color: #333; } #content { float: left; width: 850px; } #sponsors { width: 150px; text-align: center; border-left: 1px solid #999999; line-height: 100%; } #sponsors h5 { color: #FF0000; } #sponsors image { height: 45px; width: 100px; border: 0px; } </style> <body id="container"> <div id="content"> left </div> <div id="sponsors"> <div id="header">Random Images</div> <div id="image"><img src='1.JPG'></div> <div id="image"><img src='1.JPG'></div> <div id="image"><img src='1.JPG'></div> <div id="image"><img src='1.JPG'></div> <div id="image"><img src='1.JPG'></div> <div id="image"><img src='1.JPG'></div> <div id="image"><img src='1.JPG'></div> <div id="image"><img src='1.JPG'></div> <div id="image"><img src='1.JPG'></div> <div id="image"><img src='1.JPG'></div> </div> </body> Quote Link to comment https://forums.phpfreaks.com/topic/41877-is-this-the-best-way-of-using-css/ Share on other sites More sharing options...
ToonMariner Posted March 12, 2007 Share Posted March 12, 2007 no you have lots of id="image" in the html switch them to class="image" better still just get rid of the extraneus div and simply apply the style to an img selector in your css. Quote Link to comment https://forums.phpfreaks.com/topic/41877-is-this-the-best-way-of-using-css/#findComment-205140 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.