

You can adjust padding and margin as necessary but keep in mind padding will affect the overall size of the logo.Change ‘YOUR-SVG-FILE-URL’ to the URL path where your logo SVG file is located.Change ‘YOUR-LOGO-HEIGHT’ to your logo’s height.Change ‘YOUR-LOGO-WIDTH’ to your logo’s width.Make sure that you are referencing the same CSS ID or CLASS placed on your HTML element.In the final step we will use CSS to style and add the SVG file as a background to the logo element we created in Step 2.īackground: url(YOUR-SVG-FILE-URL) no-repeat center STEP 3: Use CSS3 to style and add the SVG file as a background to the logo element Change ‘YOUR-WEBSITE-TITLE’ to your website’s title or company name.Change ‘YOUR-WEBSITE-LINK’ to your website’s homepage URL.
#Html vector code code
You don’t have to link your logo but you will need to modify the code if you choose not to.You can use either a CSS ID or CLASS on the logo element.< h1 id="logo"> < a href="YOUR-WEBSITE-LINK"> YOUR-WEBSITE-TITLE< /a> < /h1> Another standard practice of ours is to link the logo to the homepage, if you choose not to link your logo you will need to modify the method below. We prefer to utilize the H1 tag for SEO purposes, but please note you can utilize any HTML element you want for this method. In Step 2, we will be creating an HTML element for the logo. If you need help with this step, please reference the Adobe help link below:Īdobe Illustrator Help (Export SVG) STEP 2: Create an HTML element for the logo In Step 1, you will need to create and save your SVG logo file this can be done using Adobe Illustrator. STEP 1: Create and save your SVG logo file
#Html vector code how to
In this tutorial we will teach you how to add a vector logo to your website using CSS3 and a Scalable Vector Graphic (SVG). So how do you achieve this when so many of today’s devices utilize different display settings? The best current method is to use Scalable Vector Graphics (SVG) and apply them as background images to HTML elements using CSS3. You of course want your website’s logo to stand out and grab someone’s attention and you definitely want it to look clean and crisp across all devices. What background quirks have gotten your goat? Let us know in the comments below.Your logo is the most important piece of your overall branding and is usually the first statement a website visitor will most likely identify with. Even with tricks like these, backgrounds provide email designers with no shortage of challenges. Remember to change these values on both the TD and VML shape elements when modifying this code. For 50% one would enter mso-width-percent:500.
#Html vector code full
This means that mso-width-percent: 1000 is actually 100%, or full page width. The number you need to pass to it is ten times the percentage you’d like. It might look confusing at first, but mso-width-percent is actually quite simple. Instead, the mso-width-percent style can be used to create a fluid width background. We found that the v:rect element wouldn’t take width:100% or width:full as width values. It gets a bit trickier to create a tiling background for a TD with percentage-based width. Table Cell Backgrounds – Percentage-Based Width This text should appear on top of your background image. The fix below only works on TD’s with a fixed width, we’ll cover fluid width TD’s next. TD’s without background will not show an image in and Lotus Notes. This example uses a conditional statement to target Outlook clients, as well as the proprietary TD “ background” attribute. Remember to include the namespace declaration we covered above. Given the prevalence of table-based email design, it won’t be long before you want to apply a background to a table cell. This namespace declaration is necessary to make sure VML capable clients render your VML properly. Let’s start with this custom Mictrosoft HTML namespace declaration: Campaign Monitor covered the following ways to implement VML for email backgrounds, but we’re going to add one more trick to that list at the end of this blog. VML has mostly been scrapped in favor of SVG, but older email clients still use it. Because of these problems many have turned to Vector Markup Language (VML), part of the Office Open XML standards. Outlook 2007, 2010 and even 2013 will give users who rely on the TD background-image property a lot of trouble. Backgrounds might seem like they should be a simple effect to achieve in HTML email, but that’s not always the case.
