CSSing your my.opera site
Friday, 29. February 2008, 09:05:36
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. 
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". 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? "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!
#visitors li a { *margin: 0px 0px 0px -146px; } This works with IE6 and 7 (at least on my machine).
Nice tool that ColorPicker tool. Thanks.
By Dasch, # 29. February 2008, 09:40:19
Okay, I'm no kill-joy!
Besides... when will you post again in your own blog?
By Schalandra, # 29. February 2008, 10:01:44
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
By Schalandra, # 29. February 2008, 10:41:52
By rezadotcom, # 29. February 2008, 15:30:42
(btw: my last boss was named Reza too.
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
Time goes by and we don't know why. Oh, is it the motion in the space?
By Dasch, # 29. February 2008, 15:56:17
By jonas22, # 29. February 2008, 18:48:31
By MizzMartinez, # 6. March 2008, 22:00:15