GetDotted Domains

Viewing Thread:
"The CSS tips n trick page..."

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sat 08/06/02 at 18:55
Regular
Posts: 787
In light of my wisdom of all things web design related. I though it was time to begin a CSS tip n trick page, especially in the light of HTML 4 deprecating a lot of current tags.

In the list of deprication, tags such as font, alink, vlink, body, margin, table cell background images and colours etc are being phased out in favour of CSS.

Here's my little ditty for starters:

1. a:link
Most of you should be aware of a:link, a:hover and a:visited in CSS, but CSS also allows you to have multiple styles on links for example:

a.menu, a.menu:visited and a.menu:hover can also exist with the usual link declarations in CSS, all you have to do is associate the class with the so fo examle gain: xx will allow you to render this link in line with a.menu instead of a:link. (hope that made sense)

2. The evil
In NS4+ the is treated as a block element and renders anything contained in a span as a

pushing it onto another line. to cure this, in you CSS file place:

.span{display:inline}

This will allow you to use the in your formatting and avoid the NS4 bug of redering as a




3. margin
This has never been a supported element in any of the HTML DTD's, but most of you may have noticed that DW uses this in your to set the page margins. The correct use for this should be in CSS:

.body{margin:0,0,0,0}

I have more, but wanted to get the ball rolling and see if any of you knew of any other little tips n trick of CSS?

Mon 10/06/02 at 17:41
Posts: 0
Whooo! wrote:
> Gah, damn W3C, I want to be able to say that my CSS and my HTML are
> W3C Validated, but the HTML validator doesn't recognise my
> > background-color to my a.link a.visited a.hover and a.active, but if i
> add them it looks stupid, anyone ways around the problem and wise and
> all knowing Tyla man?

ok, to get around the css one, simply set:
background-color: transparent;

easy, innit! btw, just so y'all know, here's a little tip for iframes... the normal syntax for iframes is:

however, u can do the following:



just to get around ur compatibility issues...
Mon 10/06/02 at 17:36
Posts: 0
Try using this wording exactly - ive checked the transitional DTD and it definitely includes iframes:

"http://www.w3.org/TR/html4/loose.dtd">

i think that should work... tell me if it doesnt
Mon 10/06/02 at 11:44
Regular
"How Handy."
Posts: 2,631
HTML 4.01 Transitional
Mon 10/06/02 at 07:31
Posts: 0
what DTD are u using for ur HTML???
Mon 10/06/02 at 00:30
Regular
"How Handy."
Posts: 2,631
Gah, damn W3C, I want to be able to say that my CSS and my HTML are W3C Validated, but the HTML validator doesn't recognise my