OT: why are LAMP sites slow?

M.E.Farmer mefjr75 at hotmail.com
Fri Feb 4 00:02:15 EST 2005


Paul Rubin wrote:
> Yes, good point about html tables, though I'm concerned primarily
> about server response.  (It's off-topic, but how do you use CSS to
get
> the effect of tables?)
To emulate a table you use the div and span tag.
(really you can do just about anything with div and span)
Div is a block level tag and span isn't.
You can also group them  together and nest them.
div and span have little meaning but the can be styled.
In the CSS declaration we create styles and then just use them later as
needed.
Try to always focus on layout first and actual style later. (CSS is all
about seperation of concerns)
You will find the verbosity of CSS is not as annoying as you might
think it might be, it is quite easy to learn and well worth the effort.
Ok here is a bad example ( do a search on Google for CSS tables ).
( this was torn out of a webapp I am working on )
.<div class='panel'>
.  <div class="archivehead"><strong>
.    <span class="leftspace">Archive</span>
.    <span class="rightspace">Entry Date</span>
.    </strong>
.  </div>
.      <div class="archivelite">
.        <span class="bold">%s</span><span>
.        <strong>%s</strong>
.        </span><span class="right">%s</span>
.      </div>
.      <div class="archivedark">
.        &nbsp &nbsp &nbsp &nbsp posted by: %s
.        <span class="right">
.        <strong>text </strong>
.        <strong> %s</strong>
.        </span>
.      </div>
.</div>
And here is some of the CSS
( these are classes the dot in front of the name tells you that, when
combined with div or span just about anything is possible. )
.  .panel {
.        border: solid thin #666677;
.        margin: 2em 4em 2em 4em;}
.  .leftspaces {
.        letter-spacing:.5em;
.        text-decoration:none;
.        color:#EEEEff;}
.  .rightspaces {
.        letter-spacing:.5em;
.        position: absolute;
.        right: 5em;
.        text-decoration: none;
.        color:#EEEEff;}
.
.  .archivehead {
.         text-indent:.5em;
.         background-color:#333333;}
.  .archivelite {
.         color:#777777;
.         text-indent:.5em;
.         background-color:#222222;}
.  .archivedark {
.         color:#777777; text-indent:.5em;
.         background-color:#111111;}
.  .archivelite a{
.         color:#BBBBDD;
.         text-decortation:none;
.         background-color:#222222;}
.  .archivedark a{
.         color:#BBBBDD;
.         text-decortation:none;
.         background-color:#111111;}
hth,
M.E.Farmer




More information about the Python-list mailing list