Beginner question - using pre for flexibility in text?

Hi,
Apologies for the beginner question, but I am struggling to work out whether it is more sensible to use <pre> in all my texts, as it seems more flexible.
It seems that when I use <p> - paragraph - I can't use multiple space bars to align certain bits of text, but more disruptively I have gaps between text when I press Enter (I guess this defines the paragraph, but isn't always wanted).
Well, basically, <pre> seems more flexible, but it behaves strangely sometimes. What do other people use?
Many thanks!
Ivan Reshetilov
http://www.ivanreshetilov.co.uk

Hi Ireshe, just a beginner like you.  Have never heard of <pre> tags, use <p> tags.  If you hit SHIFT enter after a sentence this puts in a <br> tag or line break which basically leaves a blank line between text.
If you add     &nsbp;    or lots of them between words this gives you an extra space between letters.  How all your paragraphs sit on the page is defined by CSS.  E.g.
p {
     margin:0;
     padding: 5px 0 0 10px;}
This would place all text within <p> tags on your page, with a 5px gap at the top, no space to the right or bottom and 10px space to the left.  Hope this helps, good luck!
Amanda
www.kimberleywebdesign.com.au

Similar Messages

  • Beginner question: Configure Tomcat for JAAS?

    Hi,
    This is a beginner question :-(. I'm trying to get JAAS to work on my Tomcat (6.0.12) installation. I used code from a Javaworld article (http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-jaas.html)
    Of course I had to configure my Tomcat to work together with JAAS. The document I used is: http://tomcat.apache.org/tomcat-6.0-doc/printer/realm-howto.html
    According to the Tomcat doc I have to do the following steps before I can use JAAS to authenticate a user:
    1. Develop your code. Place the compiled classes in Tomcat's classpath
    2. Setup a login.config file for Java, and tell Tomcat where to find it (set JAVA_OPTS)
    3. Configure the JAASRealm in your server.xml
    1 Develop code: I use the following classes:
    PassiveCallbackHandler.java
    RdbmsCredential.java
    RdbmsLoginModule.java
    RdbmsPrincipal.java
    These classes I put in the package rdbmsjaas.
    In the %CATALINA_HOME%/webapps/Javaworld_Jaas/WEB-INF/lib directory I created the rdbmsjaas.jar file.
    The jsp is called jaas.jsp, and is stored in %CATALINA_HOME%/webapps/Javaworld_Jaas
    2. Setup login.config
    In %CATALINA_HOME%\conf I saved the file Javaworld_all_that_Jaas.config, containing:
    Example {
       RdbmsLoginModule required
       debug="true"
       url="jdbc:mysql://localhost/jaasdb?user=javauser&password=javadude"
       driver="com.mysql.jdbc.Driver";
    };I created an XP Environment Variable JAVA_OPTS with the value <-DJAVA_OPTS=-Djava.security.auth.login.config==C:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/JavaWorld_All_That_Jaas.config> (excluding < and >)
    I used the fully qualified address, instead of $CATALINA_HOME/conf/JavaWorld_All_That_Jaas.config. I think XP balks when it sees $CATALINA_HOME).
    3 Configure JAASRealm in server.xml
    In %CATALINA_HOME%\conf\ I changed web.xml. I added the following lines:
          <Realm className="org.apache.catalina.realm.JAASRealm"
                 appName="jaas"
                 userClassName="rdbmsjaas.RdbmsPrincipal"
                 debug="99"
           />If I run the jsp from http://localhost:8080/JavaWorld_Jaas/jaas.jsp, I can enter my username/password, but when I click the Submit button, I get:
    Caught Exception: java.lang.SecurityException: Unable to locate a login configurationWhere did my configuration go wrong?
    Abel

    You will need a JSP/servlet engine such as Tomcat - Apache alone won't do it.
    I haven't seen any tutorials on set-up but the Tomcat documentation includes info on how to link to Apache. There are also books you can buy - check out the online book stores such as Amazon.
    There's also a lot of info on this forum.

  • No mnemonic or focus when using HTML for a components text

    When using HTML to set the text for a JLabel, JRadioButton or JCheckBox; mnemonics are never displayed and the outline depicting focus is never painted. Any ideas why? Any way of fixing this? Is it a known bug?
    JRadioButton radio1 = new JRadioButton( "<html>This is a test!</html>" );
    radio1.setMnemonic( KeyEvent.VK_T );
    radio1.setDisplayedMnemonicIndex( 8 );Thanks in advance,
    Jamie

    The accuracy of this response may vary depending on the look and feel you're using.
    The JRadioButton and, by virtue of being a subclass, JCheckBox are painted by the look and feel class. Those classes behave differently for HTML text. If the text property is HTML, that is there is a javax.swing.text.View that is responsible for rendering the text there is not even a call to paintFocus so the focus is never painted.
    Also, if there is no text the focus is not painted. This will happen if you create a JRadioButton with no String argument and use a separate JLabel with setLabelFor(Component) to associate it with the JRadioButton. The actual guts of the radio button never ever seems to show any indication of focus under any circumstances.
    I can only assume this is deliberate (rather than a bug) since there's fairly deliberate non-calling of methods and no provision for the focus indicator to be painted when there's no text associated with the JRadioButton or JCheckBox.

  • Beginner question using JFrame

    Hello, I'm just getting started using swing for a school project and decided that I wanted to write all the code myself without using the netbeans ide to make the interface.
    I made 2 java classes and tried to show a simple textfield.
    Unfortunately it doesn't show anything so I must be doing something wrong.
    Any suggesstions?
    package prog4gui;
    import javax.swing.*;
    public class Main {
        public static void main(String[] args) {
            FrmMain frmMain = new FrmMain();
            frmMain.setTitle("test");
            frmMain.pack();
            frmMain.setVisible(true);
    package prog4gui;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class FrmMain extends JFrame {
        private JPanel main;
        private JTextField tf;
        public void FrmMain() {
            initComponents();
            try {
                UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
                SwingUtilities.updateComponentTreeUI(this);
            } catch (Exception ex) {
                System.out.println(ex.getMessage());
            this.addWindowListener(new WindowAdapter() {
                @Override
                public void windowClosing(WindowEvent e) {
                    exitForm();
        public void exitForm() {
            System.exit(0);
        private void initComponents() {
            main = new JPanel();
            main.setPreferredSize(new Dimension(300, 100));
            tf = new JTextField(20);
            getContentPane().add(main, BorderLayout.CENTER);
            main.add(tf);
    }Thanks in advance.

    your 'constructor' is not a constructor, just another method
    //public void FrmMain() {
    public FrmMain() {

  • ACE Question- Using ACE for Verisign Certificate

    We currently have 2 ACE modules running in a FT group. There are currenly 3 contexts built and all 3 contexts have the their certs loaded on the servers. I now have a request for a 4th context but in this context they want the certifiacte loaded on the ACE. My questions are:
    1) Will this affect the other contexts?
    2) How do I handle this in an active/ standby configuration?
    3) which is the better way to handle certificates, on the ACE or on the server?
    Thanks in advance for any help.

    1) no. new context is new virtual instance, without application impact to other context (there are some network dependencies routed vs bridged mode if you used it)
    2) Do you mean how to configure SSL termination on ACE in active/standby model? You need configure parts of network configuration as active/standby. You must import SSL cert with private keys to both modules/appliances (the same private keys and ssl cert of course). All other configuration is the same (and synced between modules/appliances).
    3) ACE has HW acceleration for SSL operation. Servers without SSL can save lot of CPU time. It's better handle SSL termination on ACE.
    It's clear now?
    martin

  • Using SPELL_AMOUNT for passing converted text to Script

    Hi all,
    I tried to convert number to text using SPELL_AMOUNT function module, and when i specify the variable referring to SPELL inside script layout, it throws me error.
    The script is not allowing me to specify  variables of type SPELL, but allows me to use only elementary data types.
    Pls provide solution apart from using the function module  'HR_IN_CHG_INR_WRDS' (this works)..

    karthikeyan 
    i would suggest you to use subroutine pools for that.
    You can use the PERFORM command to call an ABAP subroutine (form) from any program,
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Field VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80).
    The internal table OUT_TAB contains names and values of the CHANGING parameters
    in the PERFORM statement.

  • Beginner question - how do I do vertical text?

    Hello, Text boxes assume horizontal text is required.  How do I turn the text box on its side so the text runs vertically?  Thanks
    (It must be really obvious, because I cant see the same question being asked, or as a topic in help)  Thanking you in advance.

    Also, just something you should know for positioning objects. For almost any object you can select the object then go to either the 4th or fifth inspector tab, the one with a ruler, and at the bottom it has options for how many degrees to turn the object, or you can flip it, etc.

  • Beginner Question - Help Needed for EJB QL Sample Application

    I'm working with a group of student interns, like myself, and we've been given an assignment to work with Oracle. All of us have no training or experience with this, so we're just learning as we go.
    I've been trying to run the EJB QL Sample Application (http://www.oracle.com/technology/sample_code/tech/java/ejb_corba/ejbql/Install.html), but I keep running into problems at step 3.
    Now, we will deploy the sample application onto OC4J. Open another command prompt and go to the folder <OC4J_HOME>/j2ee/home and run the following commands one-by-one
    > java -jar admin.jar ormi://<machine_name>:<admin_port> admin <admin_pwd> -deploy -file <SAMPLE_HOME>/build/ejbql.ear -deploymentName Ejbql
    > java -jar admin.jar ormi://<machine_name>:<admin_port> admin <admin_pwd> -bindWebApp Ejbql ejbql-war http-web-site /ejbql
    where,
    <machine_name>      Name of the machine where OC4J Server is running
    <admin_port>      Admin Port on which the OC4J server listens. This value by default is 23791 unless explicitly changed by the user
    <admin_pwd>      Adminstrator password to access OC4J. The default value is welcome
    When I do this step I get this error:
    Error: Unable to find java:comp/ServerAdministrator: Lookup error: javax.naming.
    AuthenticationException: Invalid username/password for default (sds); nested exc
    eption is:
    javax.naming.AuthenticationException: Invalid username/password for defa
    ult (sds)
    com.evermind.client.orion.AdminCommandException: Unable to find java:comp/Server
    Administrator: Lookup error: javax.naming.AuthenticationException: Invalid usern
    ame/password for default (sds); nested exception is:
    javax.naming.AuthenticationException: Invalid username/password for defa
    ult (sds)
    at com.evermind.client.orion.Oc4jAdminConsole.executeCommand(Oc4jAdminCo
    nsole.java:105)
    at com.evermind.client.orion.Oc4jAdminConsole.main(Oc4jAdminConsole.java
    :27)
    javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException
    : Invalid username/password for default (sds); nested exception is:
    javax.naming.AuthenticationException: Invalid username/password for defa
    ult (sds) [Root exception is javax.naming.AuthenticationException: Invalid usern
    ame/password for default (sds)]
    at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:153)
    at com.evermind.client.orion.Oc4jAdminConsole.executeCommand(Oc4jAdminCo
    nsole.java:102)
    at com.evermind.client.orion.Oc4jAdminConsole.main(Oc4jAdminConsole.java
    :27)
    Caused by: javax.naming.AuthenticationException: Invalid username/password for d
    efault (sds)
    at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2410
    at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2226
    at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java:1692)
    at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java:727)
    at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:134)
    ... 2 more
    ---- Embedded exception
    javax.naming.AuthenticationException: Invalid username/password for default (sds
    at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2410
    at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2226
    at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java:1692)
    at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java:727)
    at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:134)
    at com.evermind.client.orion.Oc4jAdminConsole.executeCommand(Oc4jAdminCo
    nsole.java:102)
    at com.evermind.client.orion.Oc4jAdminConsole.main(Oc4jAdminConsole.java
    :27)
    Any suggestions to fix this error?
    Thanks in advance for any help.

    George,
    The Readme.html file is available with the ejbqlsample.jar downloadable (Extract and find the doc in Ejbql\docs\Readme.html) which is printable.
    Or,
    If you are trying to print the file directly from OTN site, you need to set the Page-Setup Orientation to 'Landscape'.
    Hope this helps.
    Regards
    Pushkala

  • Pre-test Questions used as Knowledge Builders

    I need questions at the beginning of a course that will not be included when the learner clicks on the Retake and Review Quiz buttons. Pre-test questions work but they don't allow the use of text captions for incorrect and correct feedback. They use smart shapes. Are there any other limitations of Pre-test Questions?

    There are a lot of limitations. You are expected to have pretest question in sequence at the start of the course. All navigation will be cancelled: by playbar and by TOC.
    But what you say about the feedback being only smart shapes as text containers is not true at all. They follow the same styling as normal question slides. If you turned on Use Shapes for SFH in the Preferences, Defaults, it will be shapes. You can always change this even after having inserted the Quiz/Preset slides by going to the corresponding master slide, right-click on the shape and choose 'Revert to caption'. Although to me it is a mystery why you should prefer captions, just my personal opinion because shapes are so much easier to format.
    If you use normal question slides, and do not add its score to the Total score, most system quizzing variables will not include those 'Knowledge' slides. But indeed, as you point out, Review and Retake will go to the first Question slide, which may be a knowledge slide. With a shared/advanced action it is pretty easy to circumvent this. I almost never use Pretest slides for its limitations. Whenever possible I use custom question slides instead of the default ones for Knowledge slides.

  • Multi-language support for user-specified text strings used in the forms

    multi-language support for user-specified text strings used in the forms
    Instead of creating multiple forms, 1 in each different language, for the same service, is there any workaround?

    Hoan - is your question what are the considerations when creating multiligual catalogs? If so, I can tell you that at other clients I have seen them use a single catalog for one or two languages. For the two langugages, such as Spanish/English, you can create a single catalog with both of them. Once you get to more than two languages, the catalog would get unweildy and is therefore not suggested.

  • Using variables for answers to fill-in-the-blank questions

    Hello,
    For fill-in-the-blank questions, one has to provide answers. I want to provide these in the form of (user-created) variables, rather than in the form of fixed strings of characters (so then, as $$var1$$ rather than as 'rabbit'). I haven't been able to get this to work. The enter variable function is indeed available (in the properties panel), but it doesn't actually work (i.e. even if you select a variable to be entered, it doesn't actually get entered).
    Is there a way around the problem?
    1. NB that this same issue holds for text entry boxes (rather than fill-in-the-blank questions). If I could get this to work for text entry boxes, I would use them rather than fill-in-the-blank questions.
    2. One can use variables for answers to multiple choice questions. So I'm hoping I can get it to work for fill-in-the-blank questions as well.
    Thank you in advance. Marvin DuBois

    That would have been my suggestion. I don't have a dedicated blog post, but use TEB's for that kind of questions myself as well. And contrary to the widget/interaction I mentioned before, a TEB is an interactive object, which means it can be validated and there can be a score attached to it. But, it will not help you, since you have to add the correct answers in the same way as for a dropdown list in the FIB question (they are sort of TEB's there). And it is that list that doesn't allow to enter a variable instead of a fixed sequence of characters.
    Which means that you are back to the advanced actions, same as in my blog posts with the widget/interaction.
    Have a workaround (after all I am the workaround Queen) to have reporting, if you need to check only one TEB, described here:
    http://blog.lilybiri.com/report-custom-questions-part-2
    The idea is to use another interactive object that can have a score. In reality I use two instances of that same object: one with score 0 and one with score X and show the right one depending on the conditional action.
    However if you want to have multiple TEB's on the same slide, that have to be checked all with the same advanced action, than you'll need either the Mastery widget by InfoSemantics (only for SWF output) or Javascript.
    Lilybiri

  • Question about file size when using "Export for Web"

    Hi!
    I created a .mov file and worked to get a great balance between file size and quality so that I could deliver it via the web and make it easier for end users to see the video on a slower connection.
    My question: When I use "Export for Web," my .mov file is converted into a very large .m4v file--more than double the size of the original file. I know that this export option is to optimize the file for a wide variety of users/internet speeds. Am I correct in guessing that the end size is not an issue? I would post the .mov file instead, but I really like the option of embedding into a html page along with the "click to play" option.
    Bottom line--is it better to post the smaller .mov file that i originally started with or to go ahead and link to the bigger .m4v file that was created with the "Export for Web" option?

    "Export for Web" is a feature of QuickTime Pro and it makes 4 files and the html page code for easy copy/paste Web page editing.
    The very first file is called a "reference movie" and it links to the other 3 files (56kbps, 900kbps and 1.5Mbps). It, and the page code, "read" the connection speed of the viewing hardware and "serve up" the correct file based on that connection speed.
    In nearly all cases the "Desktop" version would still be smaller in file size than the original source. The times the file would "increase" in file size would be when an already compressed was used as the source file. You can find out more about your source file by opening it in QuickTime Player and viewing the Movie Inspector window information.
    There are dozens of other html "tricks" that could be used if your source file is already compressed but you want a different display size:
    Page code to show "aspect" or scale="tofit". This code allows values "outside" of those found in the actual QuickTime file be used for the Web page display. A 320X240 QuickTime .mov file looks pretty good at double size (640X480) but the file size would still be that of the source file.
    "Poster Movie" is another html trick that loads the Web based file directly in the QuickTime Player application (bypassing Web page layout restrictions). These files are also known as "Presentation Movies".
    Another method is the QuickTime Media Link file (.qtl). These are simple text based files that are used as a "direct link". These use simple XML (Extensible Markup Language) and are easily created in any text editing application. The simple syntax has amazing control over a simple QuickTime .mov file. You can launch (and quit) the QuickTime Player, display at other dimensions and even embed "links" inside the display.
    Some of my files as examples:
    http://homepage.mac.com/kkirkster/Lemon_Trees/ a "Poster Movie" style.
    http://homepage.mac.com/kkirkster/.Public/RedneckTexasChristmas.qtl
    A QuickTime Media Link file. A tiny file should download to the viewing machine, launch QuickTime Player, present the movie and it even includes a "link" to my Web page.
    Edit: It appears you must now double click the .qtl download to launch QuickTime.

  • Hello friends , I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding. He started with terminal And used a text editor to compil the c program on his mac.. So please tell me how to do the same

    Hello friends , I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding. He started with terminal And used a text editor to compil the c program on his mac.. So please tell me how to do the same and is there any pre stalled text editor on mac if yes then where and if no then which text editor to install and how to install gcc...please help me out thanks in advance !!!

    I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding.
    Why? If you are developing and writing code on a Mac why would you not use the tools Apple has given you? And Xcode, once you get use to it, is a very nice development environment that will make you life a whole lot easier.
    If you insist on using an editor and the terminal I would recommend  Emacs   but it has a long learning curve so  something like TextWrangler  will work too.
    As for the compiler if you have Xcode installed install the command line tools and you will be able to compile from the terminal.
    good luck

  • I'm new using Logic, i've been using garageband for quite awhile now though but my question is just basic. When i want to record electric guitar while clicking the software option it brings me to alot of guitar sounds that i want to chose. I chose the twa

    I'm new using Logic, i've been using garageband for quite awhile now though but my question is just basic. When i want to record electric guitar while clicking the software option it brings me to alot of guitar sounds that i want to chose. I chose the twangy electric or the distorted strat but i only hear clean sounds. No matter what kind of guitar sound i chose in the library it only produces clean guitar. How can i make it sound like it supposed to? Did i miss something i should do?

    This definitely has me stumped as I'm unsure as to why your guitar can be heard, but with none of the channel strips plugins applied to the sound.
    On the record enabled channel strip that contains your guitar input, is the "I" button located near the "R" active? Also, if you record your guitar, can you hear the FX applied to it when you play back the recorded track?

  • Can I use OCR for just a single image in a text document?

    Hi All
    I have a 37page pdf document that is mostly recognised text. i think this document was created in MS word then converted to PDF. I did not make this document.
    There are images inserted on some pages that are scans from another document. The document has footnotes, page numbers, title, text paragraphs on the pages with the images i want to ocr. I have already used the highlight an sticky note functions for some of the recognised text and don't want them lost.
    I have tried using OCR for the whole document but it doesn't work (renderable error).
    Can I use the OCR function just on a selected image within a document that has renderable text for the most part?
    thanks.

    Read what it says on the ATT page
    http://www.att.com/ipad/?fbid=s18K8c1ujw3
     Cheers, Tom

Maybe you are looking for