Ok, so I have been at this for some time now, and I am on day 3 of trying to get this to work properly with no such luck; I am a beginner web developer.
What I am essentially trying to do is to create a social media icon bar horizontally. I am trying to use svg images as the icons, I have tried using PNG images for the icons and while it works they are quite pixelated with some aliasing. I even opened the SVG images in affinity designer to resize them, then export them as PNG and the result is the aliasing I had mentioned. I want them to look sharp so I am trying to use SVG.
I used a program on a website where it essentially uses viewBox to resize the SVG how you want them for their x, y, w, h attributes, I then used the resulting code to add it to the src url in the image element, but I can not get my icons to show up in the html, and I am highly unsure what I should do in CSS to resolve this.
Here is my html code: (I have not bothered wrapping my image tags with links yet)
<div class="social-container-1">
<div class="social-container-2">
<ul>
<li><img class="test" src="/Resources/Images/Social Media Icons SVG PNG/youtube-icon1.svg#svgView(viewBox(0,0,1136,54))"></li>
<li><img class="test" src="/Resources/Images/Social Media Icons SVG PNG/soundcloud-icon1.svg#svgView(viewBox(0,0,1136,54))"></li>
<li><img class="test" src="/Resources/Images/Social Media Icons SVG PNG/bandcamp-icon1.svg#svgView(viewBox(0,0,1136,54))"></li>
<li><img class="test" src="/Resources/Images/Social Media Icons SVG PNG/facebook-icon1.svg#svgView(viewBox(0,0,1136,54))"></li>
</ul>
</div>
</div>
Here is my CSS:
.social-container-1 {
background-color: black;
height: 100px;
width: 100%;
float: left;
}
.social-container-2 {
float: right;
}
.social-container-1 .social-container-2 li {
list-style-type: none;
display: inline-block;
padding-right: 10px;
}
.test {
width: 100%;
height: auto;
}