Font formating to post code & change width of the template

  • Author
    Posts
  • #105122

    kapalic
    Member

    I am having some problems and very much frustated to use this wonderful blog:

    1. I m planing to post some visual basic programming code in my blog, but can’t find a way to have to proper formating. I copy codes from visual basic to MS Word, and copy-paste it in the blog. There appears the exact formating which I want. But when I press the save button, the formating becomes upside down! How can I keep that formating? Can I use any CSS formating? And how?

    2. I want to modify my theme or use a theme which uses 100% space in width, so that I find more space to put code. How can I do this? Please see my blog and suggest: http://kapalic.wordpress.com

    Please resque me from these problem to use this site to blog…thnx!

    Kapalic

    #105230

    1. you need to wrap your code in a

    <pre> tag and a <code> tag.
    2. don’t use microsoft word. it generates messy HTML.
    3. do use http://www.htmlconvert.net/ to convert your code to HTML entities that won’t be destroyed by the editor.

    #105247

    drmike
    Member

    2. don’t use microsoft word. it generates messy HTML.

    As well as html code that is removed due to security concerns which is why the display of teh code is changing.

    #105251

    sonofbruce
    Member

    But you can post text from MS Word using the special secret hidden “Paste from Word” function on the Visual editor, revealed by pressing Shift+Alt+v (in Firefox) while reciting the Lord’s Prayer backwards.

    #105253

    that button tries to help, but it’s not supported.
    i can’t think of any benefit of pasting into word. what feature are you trying to get?

    #105358

    kapalic
    Member

    And how can I change the width of my current template so that it becomes wider ( 100% width of the browser in total with the sidebar) ?

    #105363

    if you have the CSS upgrade,

    #container
    {
    width: auto;
    margin: 0 2em;
    }
    #content-main
    {
    width: 70%;
    }
    #sidebar
    {
    width: 20%;
    }

The topic ‘Font formating to post code & change width of the template’ is closed to new replies.