My Very Basic, Yet Effective CSS Template
Friday, 23. November 2007, 14:34:17
While this code is perfectly all right, we've been working on an automated generator to allow people greater freedom when creating their blog themes as well as making it a lot easier to do. Using the generator you can concentrate solely on your theme and not worry about the codes.
You know what the main problem with CSS is? There's just so much of it that it puts people off learning it. The thing is, to personalise your page is easier than you may think. You don't need to know every single thing in order to make your page really your own. Sometimes it's better to just edit a couple of things on the existing themes.The object of this post is to create some CSS code that will allow anyone to personalise their page while keeping it simple enough for everyone to understand. Easy eh?
First we'll start with the banner. The banner is an image file, usually 920 pixels wide by 170 pixels tall. To apply a banner to your page use the following code, but change the address of the sample banner to the address of your own uploaded banner.
#top {background: url(http://files.myopera.com/Furie/files/tutorialbanner.jpg) top center no-repeat;}Now, some images will make your blog title and subtitle obsolete. Anyone looking at my main banner can see I've included the title in the image. This works best when the title and subtitle are hidden (otherwise they look pretty stupid), which can be done using the following two lines.
#top h1 { display:none; }
#subtitle { display:none; }The next thing we'll do is put our own background up to make the page even more our own. This next line of code puts up a background image starting at the top left of the page then tiles it across and down to cover the background completely. I'm using a 300x300 pixel square but using a larger image (1600x1200 for example) will stop it being tiled because the image will take up the entire background. I've also fixed the background to the screen so that it doesn't scroll with the blog.
body {background: url(http://files.myopera.com/Furie/files/tutorialbackground.jpg) top left repeat;background-attachment: fixed;}And how does this look when we put it all together? Pretty terrible actually (just check the image I put on this post), but that's only because I chose these images as examples. With the right images you can really personalise your page and make it something special with these basic codes. Well, better than the one I did anyway. Hope this post is of some help to people.
Here's all that code put together, ready to be copied into your own CSS file and start you off customising your own page.
#top {background: url(http://files.myopera.com/Furie/files/tutorialbanner.jpg) top center no-repeat;}
#top h1 { display:none; }
#subtitle { display:none; }
body {background: url(http://files.myopera.com/Furie/files/tutorialbackground.jpg) top left repeat;background-attachment: fixed;}
And finally, click the link to check out some of my themes created using these rules.










1 2 3 Next »
varish # 23. November 2007, 15:59
dannii # 23. November 2007, 17:00
Furie # 23. November 2007, 17:17
dannii # 23. November 2007, 17:34
Furie # 23. November 2007, 17:53
Callya # 23. November 2007, 18:16
Cois # 23. November 2007, 18:16
Callya # 23. November 2007, 18:35
Furie # 23. November 2007, 18:45
Cois # 23. November 2007, 18:52
Callya # 23. November 2007, 19:19
dannii # 23. November 2007, 20:12
attilasoul # 23. November 2007, 20:37
Furie # 23. November 2007, 20:49
There's nothing that can't be found by trawling through loads of pages to find it, but this puts it all together more easily.
theoddbod # 23. November 2007, 21:25
What keeps putting me off is the object names. I'm used to being able to click on something and get the name of it, but here I'm just looking at names that could be anything. Eg, topbar1. So where's topbar2? Is there one?
Maybe I should look at Dreamweaver - I'm spoilt by Integrated Design Environments.
Furie # 23. November 2007, 21:36
This isn't to create an entire page design of course. More to modify the existing ones a little bit. I reckon it's a good starting off point.
rhona # 24. November 2007, 02:33
Maybe what i'm looking for is more complicated, I'm gonna try urs.
Do u know why my cursor's not working?
Furie # 24. November 2007, 07:44
rhona # 24. November 2007, 08:55
Furie # 24. November 2007, 09:08
Callya # 24. November 2007, 10:57
Furie # 24. November 2007, 16:04
rhona # 24. November 2007, 16:24
Why doesn't it work in Opera?
Cois # 25. November 2007, 12:13
drlaunch # 25. November 2007, 16:31
#top2 is the easy interoperable version for beginners, while #top is for those that want to dig a bit deeper into customisation of their blog design.
rhona # 25. November 2007, 23:01
But I use it and I can see his
Furie # 26. November 2007, 01:02
If anyone's got a plain english, easy to understand for a knackered Furie translation of what Remi said then please fill me in. I think it's something like "use top 2 selector cause it's less likely to balls up things" but I'm not entirely sure at the moment. If so I'll edit this post to make things easier for people to start.
rhona # 26. November 2007, 01:36
U know i can't help with that translation cause it sounded like a foreign language to me.
drlaunch # 26. November 2007, 02:07
The #top selector might give you trouble with some designs and menu configurations.
Anyway, seems like Espen used #top in his example here. Some people use #top And some people use the #top2 selector.
SqueakeyCat # 2. December 2007, 02:34
Lets_Roll # 2. January 2008, 23:40
Let me buy you a drink....
Furie # 3. January 2008, 00:47
Furie # 12. February 2008, 15:35
attilasoul # 12. February 2008, 20:44
theoddbod # 12. February 2008, 22:01
Furie # 13. February 2008, 00:37
Furie # 13. February 2008, 00:39
attilasoul # 13. February 2008, 07:31
Thank you for the advice, and for the link Mart, I will look at it later today and hopefully I can get it to work again!
Furie # 13. February 2008, 11:00
daxonmacs # 23. February 2008, 15:34
Nice job on the css on this page.
I wondered how you got rid of the bar underneath the banner and how to replace it by a custom made one?
Can you help me out on that?Also where do I change the names for the links the buttons will link to ( about; etc ) And should I upload two files if I want them to change color or "light up" when clicked or hovered upon?
Bit much to ask as a total stranger I'm afraid, but w3schools didn't really help me out here
Cheers and a nice day,
d.
Furie # 23. February 2008, 15:44
I don't actually use this template for my page, I use a more complex one I designed myself (well, put together from scraps I got from other people's pages). If you're still up for it I can show you the code for editing the menu bar. It needs a larger banner though, the way I do it.
daxonmacs # 23. February 2008, 16:50
thanks for a quick respons as well.
I got all night and the rest of tomorrow to tinker with it.
It's not like I want to have it changed at a fixed date, rather I have it customed to my desire and well ... taste of the moment.
Is it also possible to rewrite the whole of the code? I got the impression the other pages will also suffer from it if it isn't done correctly, like the /mypage/account etc.
I frankly only wish to rewrite the code for my blog, rename the links, pointed to with custom crafted buttons.
Also as a token of appreciation, can I refer to you for helping me out, or do you rather not have your name mentioned?
Regards,
dax.
Furie # 23. February 2008, 18:28
daxonmacs # 23. February 2008, 19:14
I'll get chewing on that asap, then design a new header and buttons, and Ill post your name as a reference ,thanks a lot.
Furie # 23. February 2008, 19:15
Cois # 13. March 2008, 12:02
Guess its time to play with it a bit but I'm unsure if the spaces will make a difference..
princessofdeath # 3. May 2008, 13:12
Furie # 3. May 2008, 16:35
princessofdeath # 4. May 2008, 13:04
it finally worked... i thought i was doing something wrong when the first time I tried to personalise it... coz my blog looked worse.. then somebody sent me this link *thanks to him* but i really didn't do anything wrong..the tags/css were the same... then I discovered.. I have to log out then log in to see the changes *when you are using Opera as a web browser*.
sigh... I still have a long way to go... thank you very much
Furie # 4. May 2008, 13:41