登录 | 注册 | FAQ
Anonymous

background-image

+ 发表回复

4 篇帖子 分页: 1 / 1


background-image

lacroixz » 周日 12月 05, 2010 12:39 pm

Hello guys,

For some reason my background-images don't work.. And the hover-effect for my socialnetwork images neither.
Please have a look in my stylesheet, I guess one of the ID's is causing the problem but I've got no idea.

CSS: http://mauricet.ma.funpic.org/css/style.css
HTML (Right Click -> View Source: http://mauricet.ma.funpic.org/

Kindly Regards, help will be appreciated!
头像

lacroixz

  • 帖子: 74
  • 注册: 周三 10月 27, 2010 9:26 pm

Re: background-image

HTML.net » 周日 12月 05, 2010 7:34 pm

First, in your stylesheet change

#followme li #twitter:link
#followme li #twitter:hover

to

#twitter a
#twitter a:hover

(ID's has by definition to be unique. Therefore, there are no need to say the ID "twitter" within the ID "followme" - there can only be one ID "twitter" on the page. Do you get the point?)

Second, replace this image with a transperent image:

<li id="twitter"><a href="http://www.twitter.com" target="_blank"><img src="images/socialnetworks/twitter.png" alt="twitter" /></a></li>

My theory is that the background is changing. But you can't see it.

PS.
Very well structured HTML and CSS. Nice :)

- Andreas, HTML.net
头像

HTML.net
Site Admin

  • 帖子: 1194
  • 注册: 周六 9月 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: background-image

lacroixz » 周日 12月 05, 2010 7:53 pm

Thanks Andreas!

The image path wasn't correct, 'url(images/navigation.png) instead of (../images/navigation.png)'
But thanks for the twitter images effect.
The HTML/CSS structure is important to me, it shouldn't be a mess.

Kindly Regards!
头像

lacroixz

  • 帖子: 74
  • 注册: 周三 10月 27, 2010 9:26 pm

Re: background-image

Jacintarayenz » 周二 12月 28, 2010 7:33 am

This will help you ,try this in your code.

body {background-image:url('paper.gif');}
头像

Jacintarayenz

  • 帖子: 5
  • 注册: 周二 12月 28, 2010 5:22 am


+ 发表回复

分页: 1 / 1