Centering who is online box

Go down

Solved Centering who is online box

Post by Mr Rockeye on April 21st 2014, 11:36 am

Hey,

So I tried to center the who is online box with the following code:
Code:
p {
text-align: center;
}
Now, the problem isn't that it doesn't work but that it centers other things as well, which aren't supposed to be centered.
How do I fix it? Is there a more specific naming for the 'who is online'-box?
Site: www.unitedcommunity.topdiscussion.com

Thanks in advance,
Mr Rockeye


Last edited by Mr Rockeye on April 21st 2014, 10:29 pm; edited 1 time in total
avatar
Mr Rockeye
Forumember

Posts : 86
Reputation : 1
Language : English

http://www.unitedcommunity.tk

Back to top Go down

Solved Re: Centering who is online box

Post by Pizza Boi on April 21st 2014, 11:43 am

Hi Very Happy

Code:
a[href="/viewonline"] {
  position: relative;
  left: 420px;
}

Regards,
Pizza Boi
avatar
Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Centering who is online box

Post by Mr Rockeye on April 21st 2014, 12:40 pm

What I meant was the part that I highlighted in this pic:

But thanks for the code Smile almost forgot about the title.. lol :p
avatar
Mr Rockeye
Forumember

Posts : 86
Reputation : 1
Language : English

http://www.unitedcommunity.tk

Back to top Go down

Solved Re: Centering who is online box

Post by Ange Tuteur on April 21st 2014, 10:22 pm

Hello Mr Rockeye,

You can select the p element that is directly after the who is online image with the following CSS rule.
Code:
#i_whosonline + p { text-align:center; }
avatar
Ange Tuteur
Forumaster

Male Posts : 13195
Reputation : 2911
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Centering who is online box

Post by Mr Rockeye on April 21st 2014, 10:28 pm

Thanks again Ange Tuteur
You rock  guitar 
avatar
Mr Rockeye
Forumember

Posts : 86
Reputation : 1
Language : English

http://www.unitedcommunity.tk

Back to top Go down

Solved Re: Centering who is online box

Post by Ange Tuteur on April 21st 2014, 10:46 pm

You're welcome :rose:

Topic solved and archived
avatar
Ange Tuteur
Forumaster

Male Posts : 13195
Reputation : 2911
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum