Css Tips And Tricks

CSS PLaY - http://www.cssplay.co.uk/

great site, with loads of demos, shows you how much you can actually do with css (create games for example)

Ok this is a Tips and TRICKS thread, right?

Hereā€™s a fun trick to play on other web developers, if you get the chance. Open up their CSS file and add

b,strong { font-weight: normal; font-style: italic; }
i,em { font-weight: bold; font-style: normal; }
u { text-decoration: none; border-top: 1px solid blue; }

Tons of fun. :stuck_out_tongue:

u {text-decoration: overline;}

we donā€™t need no stinking borders :slight_smile:

Thanks for the list of resources, webnauts.

Iā€™m an old skool slicer / dicer designer and need to get started in developing more sites using CSS rather than tables and mostly graphicsā€¦soā€™s I can catch up with the rest of my colleagues in this industry :smiley:

I think Iā€™m afraid to get started but I will dig through these.

Much appreciated :tup:

Hereā€™s some : :slight_smile:

http://www.pmob.co.uk/temp/fixedlayoutexample5.htm
http://www.pmob.co.uk/temp/fixedleft-header.htm
http://www.pmob.co.uk/temp/fixedlheader-footer-left.htm

http://www.webpelican.com/blog/examples/css-frames-example.htm
http://tagsoup.com/-dev/null-/css/fixed/
http://www.cssplay.co.uk/layouts/fixed.html

I havenā€™t been to these forums in a while now. Iā€™ve been over on the Killersites forums, and this is where iā€™ve been laying down all my dodgy experiments.

1st Notes:
Iā€™ve edited out my holy grail no.8 that was here for a little while, mostly because it wasnā€™t all that appreciated as i had hoped it would be, but i will carry on trying to better it, and if i do i canā€™t promise that iā€™ll be posting it in this section, as there is no double posting allowed.

Anyway, here is something that i hope you will appreciate; it is a centered horizontal menu bar list with equal width buttons. The buttons themselves arenā€™t images, just simple text on a background-color.

Initially, i was only able to get this thing to work in Mozilla 1.2.1 for the Mac platform, but with the help of billyboy over at the Killersites forums we were able to crack it. You will find a more complete summary of this horizontal list on those forums.

Blah DL 8

The latest thing that iā€™m attempting to do is to create a ā€˜faked tableā€™. Iā€™ve got a little table on my website that i use for dates, issue numbers, and magazine names. I was hoping to replace it with this faked table, but as youā€™ll see the css code is humongous, and itā€™s only humongous because i wanted to keep my ā€˜zebra stripesā€™ intact.

Faked Table Display:

Table Forge No.4

2nd Notes
I thought it might be an idea to edit this post for a second time inorder to put in a link above to direct you to the Blah DL 8 summary over at the Killersites forums, and also to drop in another Definition List tip & trick.

I used to have a couple of lists (#listleft & #listright). They were both identical, and allowed me to fool most browsers into displaying each list side-by-side, where each line of text, say in, #listleft would also be level with a line of text in #listright.

This next one will allow you to twin two columns in a dl, or definition list:

Twin List 9

Just found this one recently, since it was not yet in this list, i al adding it:
http://www.brunildo.org/test/

Great link! Bookmarked. Thanks. :slight_smile:

I wanted to find a way to enhance my dodgy definition lists (TwinLists) to include images and text side-by-side.

Quite recently, i came across Nathan Smithā€™s, ā€˜hoverboxā€™, and realised that this was something i could use or adapt to carry on using images in almost the same style as i use on my home page without losing too much continuity.

As you may already know, a hoverbox allows you to seemingly enlarge a smaller image. There are in fact two images, one that has been restricted via some piece of css code that you actually see, and a ā€˜previewā€™ image that does this hoverbox, or lightbox enlarging trick.

Hoverbox Image Gallery:

Err, anyway, iā€™m pretty sure that iā€™ve managed to get it to look the way i want it to look across all browsers, but as for the actual hoverbox part doing its magic - now that is something that is quite out of my hands, and i have no idea if it actually works in anything other than Mozilla 1.2.1 and iCab 3.0.1, so iā€™ll just leave it in your capable handsā€¦

http://www.macrankin.co.uk/web_projects/smart_lists/hoverlist_09.html

2nd Notes: (hoverlists updated!)

The above hoverlist has been completely overhauled, err, but not by me. billyboy - a pc using and php code-crunching guru has solved yet another one of my dodgy dl lists.

So iā€™m editing this post just in case some of you are tearing your hair out trying to get this thing to work. I doubt that you are, but just in case.

Look ma, no workaroundsā€¦

bb hoverlist:
http://www.macrankin.co.uk/web_projects/smart_lists/bb_hoverlist.html

P.S. You can find billyboyā€™s comments regarding his overhaul of this particular hoverbox list over on the killersites forum.

http://www.killersites.com/mvnforum/mvnforum/viewthread?thread=5535

thanks for the CSS resource!

Great list thanks!

thanks this is what I really needed

I need a CSS tutorials (the basics). I donā€™t want to read voluminous books. I want to watch video presentations, perhaps in CD-rom format.

Suggestions will help.

It costs a fortune but Eric Meyer has one here:

Writing color style in different formats in CSS :
(Web-NamedColors, HEX/HTML, RGB, RGB%)

1---------------------------------------------------------
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: DeepPink;
}

2---------------------------------------------------------
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FF1493;
}

3---------------------------------------------------------
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: rgb(255,20,147);
}

4---------------------------------------------------------
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: rgb(100%,8%,58%);
}

Go to: http://www.design-lib.com/, you can use [URL=ā€œhttp://www.design-lib.com/color_tool_mixer.phpā€][B]online color mixer[/B] to convert in above formats and [B][URL=ā€œhttp://www.design-lib.com/color_tool_schemer.phpā€]online Color Scheme Tool[/B] to make a color schemes.

Since the subjectā€™s been brought up, here are a few more color references:

D9r Color Links
Color Schemer
color cube
WEB SAFE COLOR CHART

thank you so much webnauts! your a genius!

Can someone tell me why when I set my divā€™s display to inline the height:39px property doesnā€™t work?

Thanks

Hi Opt1,

You should really have posted this in your own thread but Iā€™ll answer it now Iā€™m here :slight_smile:

When you set an element to inline then dimensions donā€™t apply because the element is ā€œinlineā€. Vertical margins are also ignored.

If you need to set dimensions then you can either float the element or leave it as block level. Or alternatively you can use padding on inline elements to create some vertical height but this will be unreliable if the height is greater than the line-height etc.

It all depends on exactly what you are trying to do.

Thanks Paul. Sorry for not creating a thread.