|
|
 |
RE: FN-FORUM: Could be a CSS thing? (Spacing)
date posted 17th May 2006 23:01
That's some good advice about IE and whitespace, I've not had any problems
with whitespace in other browsers besides IE.
In theory when browsers render html or xhtml tags they 'should' only
recognise the first space and parse the next tag or character.
With reference to your question, just because you see source code as having
lots of spaces in between them, bear in mind most good developers structure
their code to look a certain way to ease readability for example:
para text
However it shouldn't make the slightest bit of difference how you put
whitespace in your code you might want to do it like this:
Bla blab la
It shouldn't make any difference to the display of your page, but like Tony
stated there are certain incidents that IE (
>> I see a lot of sites which do use tabs for spacing in the code
>> and big sites, particularly, are very hard to follow when there
>> is so much code. As far as I know, there is no absolute
>> standard for spacing in code, but am I wrong?
>
> No absolute standard per se, but I had a weird experience with IE recently
> where a horizontal list-based navigation (LI tags) were getting an extra
> space on the left of each LI. This turned out to be IE's interpretation of
> the nicely laid out code that my IDE produced. I manually removed ALL the
> spacing and everything came out on screen as planned, although the code is
> almost unreadable now!
IE is quite picky about whitespace, especially in lists...
in some circumstances you can resolve the problem with a bottom border
on the and still have nicely formatted code.
alternatively you can put the white space after the opening like
this:
Test link
another link
not sure which is worse!
--
Join me: http://wiki.workalone.co.uk/
Thank me: http://www.amazon.co.uk/gp/registry/1VK42TQL7VD2F
Engage me: http://www.boldfish.co.uk/portfolio/
--
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|