I need to insert a logo in the top right hand corner of an HTML document. I think I have done it OK in the html sytax but, as I am quite new to this, I am unsure how I define it in the CSS. I just want it in the right hand corner above the title (which is left-aligned). WHen I check the html page the box for the logo with the red cross in the corner appears for about 1 second and then disapperas again. Can anyone help me?
Can someone help me work out the CSS code for inserting a logo into HTML document?
Hello,
Well you will need to put this in your header....
/----------------------------- the CSS
%26lt;style type="text/css"%26gt;
#logo {
background:url(logo.gif) right no-repeat;
width:your value herepx;
height:your value herepx;
}
%26lt;/style%26gt;
/-----------------------the HTML
%26lt;div id="logo"%26gt;%26lt;/div%26gt;
thats it...
Thanks,
Greg WInn
http://winn.ws
Reply:Check here:
http://www.w3schools.com/css/css_referen...
If the box appears then disappears, the problem is further down your page!... You erase it!
"The red cross appears" just means the link to the picture (logo) is incorrect: you need correct url, like:
background-image: url("pics/20048202.jpg");
Reply:If I see the site, it might help. Is it online yet or just saved at your computer?
I would define a class for your logo (considering you probably have more images on the page) and use the following for putting it in the corner via css
.[defined class] {
position:absolute;
top: 0px;
right: 0px;
}
to add a class to the logo, just add the tag[ class="" ]
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment