My name is Edward Tanguay. I am a web developer in Berlin, Germany. I learn everything I can and record it on this site.
Other things you might be looking for:
My Ubuntu Tutorial
My Datapod Project
My Blog Feed:
More on CSS:  wiki.en  wiki.de  wiki.fr  google  blogs  amazon.com  amazon.de  
CSS
Get Started with CSS
Most Recent Items
Code Example: Large button links with A elements
CSS CODE EXAMPLE - added on August 12, 2008
Many times you want to have a menu with A elements as the links instead of e.g. LI elements. Here is an example with large buttons. See example here.
SHOW CODE

post comment or question
Code Example: How to position text in a div with left and right areas
CSS CODE EXAMPLE - added on June 30, 2008
This CSS script give you absolute pixel-exact control of where to place text in a left and right area of a wide div, e.g. a header or footer. I was not able to get it to align automatically, e.g. left/center/right, so you have to know your font size and your text and position things exactly, but at least you have control, checked in Firefox and Explorer.
SHOW CODE

patryksharks321: nice code btw relative is according to the last element and absolute is towards the block it's in right? greetings
arrow pointing right
reply
post comment or question
Code Example: Simple CSS-only layout with top menu
CSS CODE EXAMPLE - added on May 20, 2008
Here is a layout for a non-flashy interface for e.g. a website tool. Solves the issue of floating divs with a clear:all div, here's an example.
SHOW CODE

post comment or question
Code Example: Simple and Expandable CSS Menu
CSS CODE EXAMPLE - added on March 22, 2008
This CSS example shows a simple UL/LI menu absolutely positioned top/left and a line-height of 1em and the body pushes the container div down 1em so that you can expand the font (ctrl-+) and the menu stays relatively sized to the content of the site. Ok, I'm starting to see how if you set even the amount of space between screen objects to the same unit (em) as the font then you have a flexible layout that someone with poor eyesite can just zoom in (I wonder if you could have your graphics expand as well). This is also cool because in the body tag you have font-size: 94% and if you change this then everything stays in proportion as well. Here is a live example.
SHOW CODE

post comment or question
Tip
tip
CSS TIP - added on March 21, 2008
The color picker in the free TopStyle Lite gives you six harmonious and complementary colors for each color you pick, nice.
Custom Images/item Types/tips/top Style Colors.png
post comment or question
Tip
tip
CSS TIP - added on March 21, 2008
TopStyle Lite is a free CSS editor which has not only code complete but also on the right side a style inspector which shows you the wide arrange of options you have. Many times I just try some out that I see and happen upon serendipitous discoveries of what CSS can do, for instance in this screenshot these roman numerals and graphic dots work in both IE7 and firefox.
Custom Images/item Types/tips/css Top Style.png
post comment or question
Code Example: Background images relative to CSS file not HTML file
CSS CODE EXAMPLE - added on March 21, 2008
I have always wondered why background images never worked when specified in the CSS file but DID work when specified inline in the HTML tag. The reason is that you have to define the path of the image relative to the position of the CSS file to the image, and inline definitions use the path relative to the position of the HTML file to the image. Nice to know.
SHOW CODE

Patrick Wright: IIRC, this is how CSS Zen Garden handles its magic--each CSS is in its own location and pulls in its own background images relative to the CSS file, which allows the main XHTML file to remain unchanged. We actually missed that aspect of the CSS spec early on in developing our rendering tool. Cheers!
arrow pointing right
Edward: Thanks for reminding me to go back to CSS Garden and humble myself, that site is so impressive. When I look at the designs with Firefox and Explorer 7 they look exactly the same, I wonder how they look on Explorer 5.0 for mac and Netscape 4 etc. I wonder if you are allowed to use hacks or if it is a purity contest.
arrow pointing right
reply
post comment or question
Code Example: Table-less Pure-CSS Form using Fieldset and Label Elements
CSS CODE EXAMPLE - added on March 8, 2008
So finally a form without HTML tables, finally got all the floats: left, right, clear both etc. correct. I have this pretty fixed to a certain size just because I don't like my forms being stretched across the page as the browser area grows (would be ok if the font sizes also grew but they don't so it's just a design integrity issue), if you want this ability (better for expanding the size of the font) just change most of the px values (especially for width and margin) to percent values and your form will stretch as needed. VIEW EXAMPLE HERE.
SHOW CODE

post comment or question
Code Example: Pure CSS Layout: Two Columns, Components, Non-Graphic Hover Menu
CSS CODE EXAMPLE - added on March 4, 2008
Here is a HTML/CSS site layout with no tables, tested in IE7/Firefox, hover menu without graphics and a modular design so you can add components in the two columns as you wish. VIEW EXAMPLE HERE.
SHOW CODE

Patrick Wright: Hi Ed--when I come across CSS samples like this, I usually want to see them in use immediately--if you had a link to the page itself that I could clck on to see the effect that would be great. Cheers, Patrick
arrow pointing right
Edward: Excellent idea, for now I put a VIEW EXAMPLE HERE link is above. I have planned to make layout examples automatically have thumbnail examples and links to full examples, just not programmed yet. Thanks.
arrow pointing right
reply
sgt: Thanks for posting great tips and code snippets that can save some effort for beginners.
arrow pointing right
reply
post comment or question
Code Example: Pure CSS Layout: Two Columns, Centered with Rounded Box Components
CSS CODE EXAMPLE - added on February 29, 2008
This layout has two columns with a dividing line in the middle (bug: which only goes down to the bottom if MORE content is on the left side than on the right side) and it is filled with rounded boxes with various colored headers, all done without graphics, which is very nice. This would be good code to get into presentation objects so these things are very easy to make and drag- and droppable.
SHOW CODE

post comment or question
Tip
tip
CSS TIP - added on February 26, 2008
This site can teach you many impressive and useful CSS skills, e.g. various kinds of corners (not just rounded), flash-like graphics with pop-up information, lots of layouts, opacity, dropdown menus, photo slideshow, all very professional looking. Nice also is that he puts his CSS in a style tag so if you are looking at something that you like, just do a CTRL-U to see the source and check it out, or copy it and experiment, etc.
Custom Images/item Types/tips/css Play.png
post comment or question
Get Started
CSS GET STARTED - added on February 20, 2008
Allows you to look at your source HTML in structured, colored boxes, nice.
Tip
tip
CSS TIP - added on February 14, 2008
You can install these in firefox or explorer in seconds, choose any one and they are all in a window to your left in your browser (HTML/CSS/Javascript/XSLT/Perl). The great thing about these is that each command has an example to the right, very nice. They are only in German, but I think if you don't read German as long as you just wanted the examples, this would still be pretty useful, quicker than googling for examples for, say, the empty-cells or in JavaScript getElementsByName. Very nice resource here. This doesn't seem to work well in Internet Explorer 7 since it is not a side bar per se but like a bookmark, use this in Firefox.
Custom Images/item Types/tips/css Sidebar.png
post comment or question
Code Example: CSS for a three-column layout
CSS CODE EXAMPLE - added on February 14, 2008
This was my first fully non-table column-layout in CSS that I am satisfied with, note that if you put the width of the body_wrapper to 100% it will also work but a user can scrunch the whole site back to the left, which isn't really desirable, and min_width can't really be relied upon from my experience but that my be a solution, a solid px width works well though, with this layout you just have to be sure that your graphics are less wide than your column widths or they will hang over into the next column, unlike the nice feature of tables where the column expands to the width of the widest graphic. See the example here.
SHOW CODE

post comment or question
Tip
tip
CSS TIP - added on February 2, 2008
Instead of picking through html tags on long lines in source view, use this plugin to see how sites are structured at a glance.
Custom Images/item Types/tips/view Source Chart.png
post comment or question
Code Example: Base CSS for making a data table with divs and spans
CSS CODE EXAMPLE - added on December 3, 2007
If you need to avoid HTML tables but need to order information in rows and columsn, etc. start with this code.
SHOW CODE

post comment or question
Tip
tip
CSS TIP - added on October 5, 2007
This is an exhaustive table showing you which code hacks will tell certain browswers to apply a CSS rules while hiding this rule from others. Perfect if you need to get Opera to do something but want to hide it from Explorer and Firefox.
post comment or question
Code Example: Simple example of z-index
CSS CODE EXAMPLE - added on August 27, 2007
Change the z-index on these two elements and see how they can overlap each other.
SHOW CODE

post comment or question
Code Example: Simple CSS Layout with unlimited boxes left and info box right
CSS CODE EXAMPLE - added on August 25, 2007
Tested this in Firefox, IE6 and IE7, simple and useful. view the example.
SHOW CODE

post comment or question
Code Example: Basic XHTML/CSS for a simple, readable website
CSS CODE EXAMPLE - added on July 27, 2007
This is the code I use if I need to write a text online, etc. It has all the correct XHTML, CSS and Javascript settings which serve as a basis to build on. Note that I use UTF-8 and if you have UTF-8 characters (e.g. Russian) then you need to SAVE your file in UTF-8 format in your editor as well.
SHOW CODE

post comment or question
Code Example: CSS solution to force Explorer to wrap text in a textarea field
CSS CODE EXAMPLE - added on April 6, 2007
If you don't specify anything then Explorer will not honor newlines in the text within a text area tag (e.g. if you are displaying code in a scrollbox). You have to add white-space: pre; to the textarea style and that fixes it.
SHOW CODE

post comment or question
Code Example: How to list items out with a little graphic to the left
CSS CODE EXAMPLE - added on March 31, 2007
This shows you how to use CSS to list out e.g. book reviews with a book next to the paragraphs.
SHOW CODE

post comment or question
Code Example: How to make a simple, vertical menu with CSS and UL and LI tags
CSS CODE EXAMPLE - added on August 30, 2006
A simple but professional looking menu, no submenus or anything like that.
SHOW CODE

post comment or question
Code Example: How to make tabbed, mouseover menus which increase in size
CSS CODE EXAMPLE - added on July 30, 2006
This is an example of a CSS/graphic implementation of a mouseover tabbed menu which will increase in size when you increase the size of the browser text. It uses small gif graphics to render the rounded corners.
SHOW CODE

post comment or question
Code Example: A nice-looking tooltip with only CSS (no javascript)
CSS CODE EXAMPLE - added on July 15, 2006
This example shows how you can make nice-looking (formatted divs) in a mouseover popup with NO javascript (only CSS). The best thing would be to wrap this in a class so it is easy to implement since the HTML gets a little messy. Note with this solution that it doesn't matter how far down you have scrolled on the page, it still works (unlike any javascript solutions which get confused with mouse position once the page has scrolled past the original top-left position). There is only one problem with this script: in Exlorer the pop-up tooltip shows UNDER any other tooltips, will have to fix that.
SHOW CODE

post comment or question
Code Example: How to make a nice info popup for Firefox/Explorer
CSS CODE EXAMPLE - added on January 5, 2006
This css code will allow you to easily define tags which make the cursor turn into a question mark and then a text blend in, words in Firefox and Explorer.
SHOW CODE

post comment or question
Code Example: How to make the background image stationary in CSS
CSS CODE EXAMPLE - added on November 8, 2002
If you want to make your background image stationary in HTML, then you add "bgproperties=fixed" to the BODY tag. But if you want to do it in CSS, this is the code.
SHOW CODE

post comment or question
Code Example: More CSS basics
CSS CODE EXAMPLE - added on January 14, 2002
This is a work file that I used while reviewing some advanced CSS commands. The borders and the absolute positioning are interesting.
SHOW CODE

post comment or question
This site was made with Datapod.