Side Bar ad

IrQ22

macrumors newbie
Original poster
Oct 15, 2016
5
0
Milky Way
I want to create an ad 300 px X 600 px for a web site, the web site wants HTML Code.

i used Adobe Illustrator to create the ad, and can export to CSS, but now i'm lost.

CSS needs to go "inside" HTML code, right? I'm thinking i need a "wrapper" of HTML code to make the CSS work.

Thanks for any help
 

Akrapovic

macrumors 6502a
Aug 29, 2018
672
1,008
Scotland
CSS is usually a separate file, but it can be in the HTML tag. So you'll be looking at something like this.

<img src="advert.jpg" alt="Sidebar Advert" class="advert">

IMG tag displays the image. SRC is the source, so point that to where your image is located. Alt is the name of the image. Class is the CSS to apply to the image.

Any CSS you have goes in the CSS file, something like

.advert {
width: 300px;
height: 600px;
border: 2px solid black;
}


If you don't have access to the CSS file then you can adjust your HTML img tag to include the style, however, this isn't recommended.

<img src="advert.jpg" alt="Sidebar Advert" style="width: 300px; height: 600px; border: 2px solid black;">

Does that help? Without more information, it's hard to help more.

I suspect you won't need the CSS if you have the jpg/png of the ad you want. So you might just need:

<img src="advert.jpg" alt="Sidebar Advert">