Jump to content

how to make a background with css full with link (to cover a div?)


rootKID

Recommended Posts

Hello once again, i will do this one short, since i feel stupid asking about it, but its a must since i cannot remember, and might be a rookie question -.-'... anyhow, here is my css:

  .chat_div_bottom_global_friend_list_button a:hover {   text-decoration:none;   color:#CDCDCD;   background-color:#900;  }  .chat_div_bottom_global_friend_list_button a:link,a:visited,a:active {   text-decoration:none;   color:#CDCDCD;  }

here is my html:

<span class='chat_div_bottom_global_chat_rooms_button'>  Chat Room (Public)</span>  <span class='chat_div_bottom_global_friend_list_button'>  <a href='#'>Friend list (0)</a></span>

now the question, i have a background to the link, but i would like that background, to cover the whole span if possible, any ideas? X)... [PICTURE ATTACHED]

Link to comment
Share on other sites

For that to work, the link and the span need to have the same dimensions. That probably means setting their display property to block or inline-block. And that might mean that having both the span and the link is not necessary. I don't know why you need both, so I can't be sure, but maybe you need only the link. BTW, is the link really a link, or are you just using it to trigger some JavaScript? If the latter, you might not need a link. You might only need the span.

Link to comment
Share on other sites

my original plans, was to create a kind of facebook chat combined with a shoutbox that both was ajax-based.. so first off, i would (by the friends) link, open up a kind of div-box above that link/line, and it will show the friends i have in my friend-list, and if they are online, i would be able to click on them, and an another box would appear with a private live chat with that person, exacly as facebook actually, just trying to make it more simpler somehow.. still working on the idea itself... that, and then about shoutbox, i hat plans on making something similar to I.P.Board forum chat module, a live-chat/shoutbox that can allow you to chat to everyone and anyone, like the new picture i attached also says on the left, public chat room. then click that, and a box will appear just like friends, BUT, in this box, i had plans on making a ''somehow'', a box to appear like the friends box, just with the shoutbox in there, and this box would appear right above the line, and centered... that was the plan, but like i said, im still working on the design as a start, and then code it after that... i also have plans on adding users to the chat, which i am sure if i remember right, also is possible to I.P.Board forum chat module, so i/user can see who is online IN the actual chat-box.. so, now you know my plan/idea... if that helps anyway X)... anyhow, why or how can i only use the span, as you say?... can i use the span as a link, so i could be opening the window above the line as i refer to above here?... PS: if you wonna have a detailed explanation, just say, it a little late right now, so not sure what im writing anyways X)... anyhow, talk to ya tomorrow, hoping an answer by then, if i did not fixed the damn problem myself :P...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...