Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

relative sizing and positioning , rather than absolute.

Status
Not open for further replies.

JamesGMills

Programmer
Aug 15, 2005
157
GB
Hi,

I am just running a website through and i am getting some errors.

It is basically saying that for me to get WCAH AA i have to do this:Use relative sizing and positioning , rather than absolute.

What i understand by this is that i should use % rather than px. Of course this is going to cause me problems as i need the main tabel to be a set width.

Can anyone explain how to get around this and if CSS can help?

Thanks
 
I think that for them to say that is really bad. Using absolute positioning can work quite well, if done properly.

The fact that most people use it shockingly, doesn't mean that they should tar all CSS developers with the same brush. Shame on them.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I use absolute all the time as i am sure most of you lot do.

Do i take from your answer you think that absolute is fine and there is no other way?

Thanks
 
Well... you could always ignore that advice. AFAIK, the WAI guidelines are just that - guidelines.

As long as you use common sense, I don't think that you should be forced to use one type of positioning or another to "achieve" "compliancy".

Dan





[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I try to avoid absolute positioning as much as I can. However, I do know that there are things where it cannot be avoided. However, rather than jumping to absolute positioning, I try to think of alternatives.

As for the absolute units, again, I try to avoid them but I am less successful at that. I would say that I strive to do most in ems or percentages, but a lot more times than with positioning, I find it impossible to avoid using absolutes.
 
Yes I agree...

QUOTE: AFAIK, the WAI guidelines are just that - guidelines.

What does AFAIK stand for please?

QUOTE: I don't think that you should be forced to use one type of positioning or another to "achieve" "compliancy".

True however if you meet WCAG's then you know you care doing your best for people to view your site. They are there for a reason and here in the UK we have the disability act to think about - or should i say peole SHOULD be thinking about it...
 
Scrap that AFAIK = As Far As I Know!

Yes WCAG are guidelines... Web Content Accessibility Guidlines

However it would be nice to conform to a national standard? I guess you are right... try and avoid as much as you can but if you need to then thats that.

Thanks fot the chat!
 
AFAIK = As Far As I Know

As I say - I'm not suggesting you don't become compliant... I'm just saying that for them to say you cannot achieve compliancy with absolute positioning is just plain wrong.

Dan




[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Which guideline does it say you're breaking with absolute positioning? The only thing I could find in the WCAG Specification is checkpoint 3.4:
3.4 Use relative rather than absolute units in markup language attribute values and style sheet property values. [Priority 2]

For example, in CSS, use 'em' or percentage lengths rather than 'pt' or 'cm', which are absolute units. If absolute units are used, validate that the rendered content is usable
There's a world of difference between absolute units, which are discouraged, and absolute positioning which isn't mentioned. If your validator is failing you purely for using absolute positioning, it's the validator that's at fault.

Mind you, it's still a pretty stupid rule. If interpreted literally, almost any website that has an image in it will fail - since we almost always specify absolute values for their heights and widths (and quite right too). I think they wrote it on a Friday afternoon. Unfortunately, one ridiculous rule can bring the rest into disrepute (not that there's only one...).

I think you could argue, in any case, that the "If absolute units are used..." sentence makes it ambiguous as to whether or not absolute units really are completely banned in AA sites. Just use %s and ems where you can and move on.

I believe the W3C are in the process of overhauling these guidelines to bring them into the 21st century. But given the glacial progress of W3C standards, don't expect it any time soon!

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top