|
After an extended period of tweaking and
customization and more tweaking to this back-end engine... Finally, at long last I get to sit down and actually type some
content.
After a busy morning which involved a lot of
exertion... had a hearty lunch before settling down to... yes...
more exertion. In this case, throwing a lot of
exceptional cases at this engine and template (that
I put a lot of effort in) in an attempt to try to break
it... not only that.. under both Mozilla Firefox and
IE7.
As a result a lot of things were discovered that
'breaks' the template - i.e. if text runs off the right edge of the
screen, the template layout breaks up and makes the hated horizontal
scrollbar appear.
It seems that if I don't do anything funny, no one
would notice that there could be anything wrong.. but I couldn't sleep
peacefully at night with the knowledge that something could have been done, but
wasn't. (That explains my distressing masochistic compulsion.)
One culprit is pasting of text formatted with the
<pre> tag - which indicates a block of preformatted text, such as source
code.. where lines are not wrapped, but run off the edge of the
screen..
For this case a CSS hack serves to force the
contents within <pre> tags to also wrap... however, only under FireFox.
IE7 still breaks crap.
However, not to panic, there is a custom
<code> tag that makes source code appear as below:
C Code
-
for(i= 0;i< 10;i++ ) { printf("Lengchai boh?\n"); }
-
while(1) { printf("Ini bagus punya\n"); }
C# also can
-
/// <summary>
-
/// Initializes a new instance of the <see cref="TFTPClient"/> class.
-
/// </summary>
-
/// <param name="server">The server.</param>
-
public TFTPClient(string server)
-
: this(server, 69) {
-
}
-
-
/// <summary>
-
/// Initializes a new instance of the <see cref="TFTPClient"/> class.
-
/// </summary>
-
/// <param name="server">The server.</param>
-
/// <param name="port">The port.</param>
-
public TFTPClient(string server, int port) {
-
Server = server;
-
Port = port;
-
}
How to write Tetris in VB.net...
-
Public Function WillCollide(ByVal shape As Shape, ByVal direction As NewDirection)_
-
As Boolean
-
-
Dim pntsToCheck As Collection(Of Point ) = GetNewPoints (direction )
-
For Each pnt As Point In shape.Points
-
For Each pnts As Point In pntsToCheck
-
If (pnt.Equals(pnts)) Then
-
Return True
-
End If
-
Next
-
Next
-
End Function
-
Public Function WillCollide(ByVal direction As NewDirection) As Boolean
-
Dim pntsToCheck As Collection(Of Point ) = GetNewPoints (direction )
-
For Each pnt As Point In pntsToCheck
-
If (pnt.X < 0 Or pnt.X > 9 Or pnt.Y > 19 Or pnt.Y < 0) Then
-
Return True
-
End If
-
Next
-
End Function
All automatically formatted! Especially...
1 Note the neat code line numbers and
2 Language-specific syntax highlighting!
3 Note the monospace char
width!
However the template's auto margin style definition
was still not enough to prevent the template from breaking up and the
horiz scrollbar from appearing... This was solved
in CSS by setting the <code> class width to 720px,
fixed.
After these corrective measures:
In exceptional case of the source code being too
long (as in code1.code2.code3.code4...codeN.dosth();
1) the template won't break, but
horizontal scrollbar appears. still acceptable.
2) <pre> tag will break template in IE7, no
matter what.. because CSS overriding the <pre> tag to word wrap (as below)
doesn't work...
This still doesn't wrap <pre> tag code in IE7.. -_-"
-
pre {
-
white-space: pre-wrap; /* css-3 */
-
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
-
white-space: -pre-wrap; /* Opera 4-6 */
-
white-space: -o-pre-wrap; /* Opera 7 */
-
word-wrap: break-word; /* Internet Explorer 5.5+ */
-
width: 99%; /* remove horizontal scroll-bar when viewing in IE7 */
-
}
Can anyone give me any solution that works to wrap <pre> tag text in IE ???
The motivation behind making all these painstaking
customizations were so that all these features are built into the rich text
editor, so that I don't need to separately enter any HTML tags.. thanks to
putting in the diligence in the one time job ,
(which was a long time job) to solve all these problems.
I still cannot foresee the drama of the effort to
produce automated prettily formatted content being made into a movie.. I guess
making Internet content robustly browser-friendly still does not carry the same
glamour as internet hacking XD
Still, carrying the euphoria of achievement.. it
was then time for more exertion in the form of a swim in the nice
weather..
Next up: The lunch at Sungai Kob,
Kulim (with photos! oh wow!)
|
Chinese Dictionary S...
Wow.. will download and try! XD
First Steps after in...
re: XAMPP vs. WAMP - I am not sure ...
MySQL database Chara...
Just to add to the article - to those...
First Steps after in...
XAMPP vs. WAMP - Thanks for sharing t...
MySQL database Chara...
Not only Joomla, everything else sho...