How to place icons where I want them?
In my current HTML code for icons in my webpage's header, I use the code:
<a href=''>开发者_Go百科<img src=''/></a> | <a href=''><img src''/></a>
which puts my icons extremly close, next to eachother, but with a "|" between them.
Could someone recommend any preferably HTML code examples, that would allow me to place the icons more specifically and without the "|" in between them.
(Excuse the former poor explanation of my problem!)
You could use CSS inline with HTML which would look like this:
<a href='' style='margin: 0px 10px 0px 10px'><img src=''/></a> <a href='' style='margin: 0px 10px 0px 10px'><img src''/></a>
This adds a 10px margin to the left and right of each link.
However, adding the CSS in the head of your HTML page would be a better idea:
<style type="text/css">
.menuItem {
margin: 0px 10px 0px 10px;
}
</style>
And then using this as the HTML instead:
<a href='' class='menuItem'><img src=''/></a> <a href='' class='menuItem'><img src''/></a>
精彩评论