Skip navigation.

exploreopera

| Help

Sign up | Help

v.plonk!

don't feed the trolls

CSSing your my.opera site

,

Maybe you have seen that I made some minor changes to my layout lately. There are some things I found out using Opera, Firefox (with DevTools) and IE7, I'd like to share so you don't run into the same trouble. :ko:

Comments
It's pretty cool, when your visitors can directly see your replies in the comments. If you just want to give your own comment a different background color it's made in seconds. You need only 1 line of CSS code:
.ownercomment {
    background: #YOUR_COLOR_AS_HEX_CODE;
}
(If you don't know how to get the color code, just try this small tool.)

I additionally used some small background images to give is a certain "theme" (I shortened the URL a little bit to make it more clear):
.comment1 {
    background: #181818 url('SERVER_URL/comment_1.png') repeat-y;
}
.comment2 {
    background: #272727 url('SERVER_URL/comment_2.png') repeat-y;
}
.ownercomment {
    background: #001c30 url('SERVER_URL/comment_own.png') repeat-y;
}
Et voilà... the comments are "stylish". :wizard:



Sidebar Boxes
Next I improved the look of the sidebar boxes. That's very easy as well:
#side h2, #side caption {
    background: #001c30 url('SERVER_URL/sidebox_head.png') repeat-y;
}
.sidebox {
    background: #181818 url('SERVER_URL/sidebox_body.png') repeat-y;
}
Okay, that was pretty obvious, wasn't it? :coffee:



"Recent Visitors"-Sidebar
Next I wanted to change the last visitors box a little bit, to make it look more like a list than a collection. Easy-peasy in Opera and Firefox. We just define our own set of CSS rules for every element included:
/* VISITORS SIDEBAR */
#visitors ul {
    border: none;
    width: 230px;
    margin: 0px;
    padding: 0px;
    background: transparent;
}
#visitors li {
    display: inline;
    height: 80px;
    border: none;
    width: 230px;
    margin: 0px;
    padding: 0px;
    background: transparent;
}
#visitors li:hover {
    width: 230px;
    margin: 0px;
    padding: 0px;
    background: transparent;
}
#visitors li.first {
    border: none;
    width: 230px;
    margin: 0px;
    padding: 0px;
    background: transparent;
}
#visitors li.mid {
    border: none;
    width: 230px;
    margin: 0px;
    padding: 0px;
    background: transparent;
}
#visitors li a {
    color: #006bd0;
    border: none;
    width: 73px;
    margin: 0px;
    padding: 0px;
    background: transparent;
}
#visitors span {
    float: left;
    height: 22px;
    width: 140px;
    color: #004e87;
    border: none;
    margin: -60px 0px 0px 73px;
    padding: 25px 0px 25px 0px;
    background: transparent;
    font-size: 1.5em;
}
#visitors span:hover {
    color: #006bd0;
}
#visitors img {
    float: left;
    border: none;
    margin: 0px;
    padding: 0px;
    background: transparent;
    margin: 10px 0px 0px 5px;
}
That does the trick... at least if your visitors use a real browser. If they don't, this means they use an Internet Explorer, you need to "cheat" a little bit.
Be aware that the following code is NOT valid CSS! :irked:
#visitors li a { *margin: 0px 0px 0px -146px; }
This works with IE6 and 7 (at least on my machine).

Hva er denne figur? What is this statue called?New food for my Dreamcast

Comments

avatar
Comment test. :D
Nice tool that ColorPicker tool. Thanks. :up:

By Dasch, # 29. February 2008, 09:40:19

avatar
Ah... you just want to see, if that styling works, eh?
Okay, I'm no kill-joy! :happy:

Besides... when will you post again in your own blog? :eek:

By Schalandra, # 29. February 2008, 10:01:44

avatar
Ah... you just want to see, if that styling works, eh?
Okay, I'm no kill-joy!
And I said thanks for the ColorPicker tool. It is really nice. :smile:

My blog? Hmm..., don't know. There is just nothing special that crosses my mind or my eyes that I can post.

By Dasch, # 29. February 2008, 10:24:59

avatar
And I said thanks for the ColorPicker tool. It is really nice.
Oh, I just searched for a useful tool, as not everybody knows how to get the color code. That's just "service".:cool:

By Schalandra, # 29. February 2008, 10:41:52

avatar
:wait: :wait: :wait: :confused:

By rezadotcom, # 29. February 2008, 15:30:42

avatar
Anything unclear reza?
(btw: my last boss was named Reza too. :smile: )

The changes mentioned above have to be written into the custom style sheet you can add to your site. See:

My page > Account > Design > custom style sheet


In your special case it should be right here:
http://my.opera.com/rezadotcom/account/usercss.dml

By Schalandra, # 29. February 2008, 15:52:36

avatar
:wait: :wait: :wait: :confused:

Time goes by and we don't know why. Oh, is it the motion in the space? :wink:

By Dasch, # 29. February 2008, 15:56:17

avatar
nice how you are working on it, i will read an learn it and maybe i can do my own design then ;-)!

By jonas22, # 29. February 2008, 18:48:31

avatar
.ownercomment {
background: #YOUR_COLOR_AS_HEX_CODE;
}
It does work! :happy:

By MizzMartinez, # 6. March 2008, 22:00:15

Write a comment

You must be logged in to write a comment. if you're not a registered member, please sign up.