Someone give me a hoover, i need to neaten my code up...
Hi All,
Got another quick question for you clever people.
Iv set up reseller site and for some reason when i view the source of the page from my browser, all the code is all over the shop instead of neatly sorter like it is in my html editor.
Im just wondering if thats a problem and how it can be sorted out if at all?
P.S. The funtionality of he site is fine, works for the most part like its supposed to, its just the code is messy when i view the source from the browser.
Thanks peeps
pr0gr4mm3r posted this at 23:39 — 27th October 2008.
He has: 1,502 posts
Joined: Sep 2006
Whitespace does not matter how your HTML is displayed. I'm guessing that your editor treats tabs differently than your source viewer.
decibel.places posted this at 23:48 — 27th October 2008.
He has: 1,494 posts
Joined: Jun 2008
pr0gr4mm3r is correct - whitespace does not matter
perhaps your server is using some kind of compression, stripping the whitespace, for more compact/efficient files?
JeevesBond posted this at 08:33 — 28th October 2008.
He has: 3,956 posts
Joined: Jun 2002
Exactly. You should check the options of the code editor, see if there's an option to use spaces instead of tabs. Spaces are always formatted the same, no matter what software is showing them.
Also, if you switch to spaces instead of tabs, you won't be among the first against the wall when the anti-tab revolution comes.
a Padded Cell our articles site!
decibel.places posted this at 15:37 — 28th October 2008.
He has: 1,494 posts
Joined: Jun 2008
Spaces are always formatted the same, no matter what software is showing them.
True, for text editors.
However, rich text editors (eg Microsoft Word) will not display spaces with uniform spacing.
For that reason, to line up text in Word, you must use tabs.
pr0gr4mm3r posted this at 14:14 — 28th October 2008.
He has: 1,502 posts
Joined: Sep 2006
I wouldn't go that far. The beauty of tabs is that you can change how much you want it to indent. For example, if I prefer a 5-space indent, and you prefer 3, I can still send you code, and you can view it to your liking based on what your editor is configured for.
vladmm (not verified) posted this at 22:48 — 28th October 2008.
They have: 5,633 posts
Joined: Jan 1970
OMG, Whats the anti-tab revolution and whens it coming?
Doesnt sound good.
I've found the "Convert Tabs into Spaces" option in my code editor which is PSpad and i clicked on it and it asked me to enter tab width for conversion which i just left as 2 and clicke ok on.
I then check the view sorce of the page and all the code is still all over the shop.
I'm really not that experienced with this sort of stuff.
Anything im doing wrong do you think?
pr0gr4mm3r posted this at 00:47 — 29th October 2008.
He has: 1,502 posts
Joined: Sep 2006
Can you provide a link?
JeevesBond posted this at 14:29 — 30th October 2008.
He has: 3,956 posts
Joined: Jun 2002
Don't worry, am only joking about tabs. Just trolling.
It doesn't sound like you've done anything wrong. A link, as pr0gr4mm3r said, would be good.
a Padded Cell our articles site!
decibel.places posted this at 16:06 — 30th October 2008.
He has: 1,494 posts
Joined: Jun 2008
How quickly rumors spread....!
vladmm (not verified) posted this at 22:08 — 2nd November 2008.
They have: 5,633 posts
Joined: Jan 1970
Hello,
Heres the link:
http://www.vladmihalache.com/ewriterpro/
Cheers for all your help.
decibel.places posted this at 23:53 — 2nd November 2008.
He has: 1,494 posts
Joined: Jun 2008
Hi Vlad,
The source of the page appears to be one long line without any returns (CR/LF)
What did you use to create it?
This looks like an affiliate program, did they create the page for you?
I also noticed that you do not have meta tags for keywords or description (deprecated, perhaps, but not worth ditching altogether). A charset meta tag is generally helpful, too.
Also, no DOCTYPE declaration
(maybe this is the answer - Quirks Mode?)
webwiz posted this at 04:32 — 3rd November 2008.
He has: 629 posts
Joined: May 2007
Tidy
decibel.places posted this at 04:52 — 3rd November 2008.
He has: 1,494 posts
Joined: Jun 2008
I looked for Tidy in the source output - I still suspect the code was auto generated another way...
vladmm (not verified) posted this at 18:00 — 6th November 2008.
They have: 5,633 posts
Joined: Jan 1970
This is a sort of sales page for an affiliate program. The only thing copied is the text within the page.
The design itself was taken from a website packadge i have and i just took that code added my pics and text.
The program i use to edit everything is PsPad.
webwiz posted this at 01:55 — 7th November 2008.
He has: 629 posts
Joined: May 2007
Sorry Decibel.places,
"Tidy" was my answer to this:
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.