Jump to content
rootKID

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

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]

Share this post


Link to post
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.

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...