Can someone help me work out the CSS code for inserting a logo into HTML document?
May.29, 2008 in
CSS
harparcat asked:
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?
Custom Search
June 1st, 2008 at 4:17 pm
Hello,
Well you will need to put this in your header….
/—————————– the CSS
#logo {
background:url(logo.gif) right no-repeat;
width:your value herepx;
height:your value herepx;
}
/———————–the HTML
thats it…
Thanks,
Greg WInn
June 5th, 2008 at 3:58 am
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=”” ]
June 7th, 2008 at 9:17 am
Check here:
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”);