So let's insert that banner logo into this DIV. Again, I am going to click to place my cursor inside the DIV, you can check in the code and make sure you are inside the right one or checking up here to make sure you are in the right place and in Images, I have an image called site-logo, click and drag it into place. Now I want to add some alternate text, Snug As A Bug. All Text only appears behind the image in the code, it won't display on the page, but it's an important consideration for anyone who is surfing the web with their images turned off, or anybody who might be using a browser that reads a page to them. So always add All Text.
Now let's go ahead and set a link from this graphic to what's going to be the main page of our website. We haven't created it yet, but you will see, you can create a link in a MasterPage just like you would create it anywhere else on a page. So if I click and select this, and I choose the Link button, then I can type default.aspx, which is going to be the homepage of our ASP.NET website, and click OK, and that's just going to make sure that our logo always brings our users back to our homepage. By the way, if you notice that Expression Web just created a new style and called it Style 1 and added it to the Style task pane, that style simply sets the image border to zero.
When I set that banner to be a link, you would have automatically gotten a border around it in the color of your link color, unless you set border to zero. And since Expression Web assumes you don't want that ugly border there, and I certainly don't, it automatically creates that style.
Now you can rename it, you can create that style yourself, but you will almost always find an automatically generated style like this in your Styles task pane if you turn an image into a link.
Comments