Click to See Complete Forum and Search --> : Cutting Extra Code With Css
coltclint
09-21-2005, 03:00 PM
Hi,
I have a website: www.dictionarium.com and I would need eliminates extra 'source code'. The code is bad, I agree!
For Example I would need a .css to change the instances of <font>, for example.
Instead the 700 lines of code, would be possible writting the same contents with the half of this value?
Thank you for your assistance.
Colt Clint
the tree
09-21-2005, 03:46 PM
Probably down to about a third I reckon. Even better, the thinking part seems to mostly be done for you. Ready made 3 Collum Layout (http://www.glish.com/css/7.asp).
coltclint
09-21-2005, 06:17 PM
I don't know.
I am testing now, but WHERE /HOW I will 'hidden' the links and specially the 'search box' at the end of the banners?
For example, I have 12 forms like that:
<div id="MerriamWebsterCollegiateDictionary" style=display:none>
<FORM action=http://www.merriam-webster.com/cgi-bin/dictionary method=post>
<CENTER><IMG alt="" src="/IMAGES/mw_dict.gif" border="0">
<CENTER>
<FONT face="Ariel, Helvetica" color=#ffffff
size=2>
<CENTER>Merriam-Webster Collegiate Dictionary</CENTER></FONT>
<DIV align="center">
<FONT face="Ariel, Helvetica"
color=#ffffff size=1>Enter a word or
phrase</FONT><BR>
<INPUT type="hidden" value="Dictionary" name="book">
<INPUT size="15" name="va">
<INPUT type="submit" value="Go">
</DIV></CENTER></CENTER>
<DIV>
</DIV>
</FORM>
</div>
I know it is possible put this form in ONE LINE ONLE:
<div id="MerriamWebsterCollegiateDictionary" style=display:none><FORM action=http://www.merriam-webster.com/cgi-bin/dictionary method=post><CENTER><IMG alt="" src="/IMAGES/mw_dict.gif" border="0"><CENTER><FONT face="Ariel, Helvetica" color=#ffffff size=2><CENTER>Merriam-Webster Collegiate Dictionary</CENTER></FONT><DIV align="center"><FONT face="Ariel, Helvetica" color=#ffffff size=1>Enter a word or phrase</FONT><BR><INPUT type="hidden" value="Dictionary" name="book"><INPUT size="15" name="va"><INPUT type="submit" value="Go"></DIV></CENTER></CENTER><DIV></DIV></FORM></div>
From 21 lines we have 10, but in true it is one line only!
It is saves memory or increases the speed of open a webpage?
Thanks
Colt
CompGeek01
09-21-2005, 07:00 PM
# of lines means nothing in a file. All that a line break is is a special character. If you remove all the line breaks from a 100 line file you've just saved 100 characters (or maybe 200 if it's windows \n\r). 100 characters = 100 bytes = .78kb = pretty much nothing.
Zarel
09-21-2005, 08:37 PM
100 characters = 100 bytes = .78kb = pretty much nothing.
Erm? I thought 100 bytes was less than 0.1 KB.
Daniel T
09-21-2005, 09:30 PM
Erm? I thought 100 bytes was less than 0.1 KB.
0.09765625 KB, in fact ;)
ray326
09-21-2005, 10:51 PM
I looked around and eventually your site said,
Microsoft VBScript compilation error '800a03ea'
Syntax error
/technology3.asp, line 85
strDB = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(/_private/dictionarium2.mdb")
--------------------------------------------------------------------------^
CompGeek01
09-21-2005, 11:17 PM
Erm? I thought 100 bytes was less than 0.1 KB.
And? Notice the lower case b.
coltclint
09-22-2005, 06:36 AM
Thanks! Many thanks!
Now works fine!
Colt Clint
mikepurvis
09-22-2005, 09:05 AM
Probably down to about a third I reckon. Even better, the thinking part seems to mostly be done for you. Ready made 3 Collum Layout (http://www.glish.com/css/7.asp).
You can't put a footer on this type of layout. Please be careful recommending it to newbs.
This is a three-column layout that uses similar principles as the Piefecta: http://sandbox.mikepurvis.com/css/bordercolumn/three.php
You can put a footer on it, you don't need images for Faux Columns.
the tree
09-22-2005, 02:01 PM
You can't put a footer on this type of layout. Please be careful recommending it to newbs.Underneath the layout is the entire source code, surely that is pretty much a footer?
Ben Rogers
09-22-2005, 03:39 PM
<div id="MerriamWebsterCollegiateDictionary" style=display:none><FORM action=http://www.merriam-webster.com/cgi-bin/dictionary method=post><CENTER><IMG alt="" src="/IMAGES/mw_dict.gif" border="0"><CENTER><FONT face="Ariel, Helvetica" color=#ffffff size=2><CENTER>Merriam-Webster Collegiate Dictionary</CENTER></FONT><DIV align="center"><FONT face="Ariel, Helvetica" color=#ffffff size=1>Enter a word or phrase</FONT><BR><INPUT type="hidden" value="Dictionary" name="book"><INPUT size="15" name="va"><INPUT type="submit" value="Go"></DIV></CENTER></CENTER><DIV></DIV></FORM></div>
This, for example, could be changed to:
<div id="MerriamWebsterCollegiateDictionary">
<img src="/images/mw_dict.gif">
<form action="http://www.merriam-webster.com/cgi-bin/dictionary" method="post">
<fieldset>
<legend>Merriam-Webster Collegiate Dictionary</legend>
<input type="hidden" value="Dictionary" name="book">
<label>Enter a word or phrase: <input type="text" name="va"></label>
<input type="submit">
</fieldset>
</form>
</div> and then be made to look the same with some CSS1. That would cut all of the extraneous HTML.
Also, you said you had the form twice. If you gave the form a class, then in the CSS, you could just use ".dict" or whatever, to refer to all the dictionary forms, cutting the code further.
coltclint
09-22-2005, 04:54 PM
Ben Rogers,
Many Thanks.
I am doing like you did. It is cool.
Colt :D