• Resolved mrwolfy

    (@mrwolfy)


    Hi,

    I am trying to get the “code” tag to style posted code properly through the html editor in the Administration Panel.

    Is there a tutorial on how to use this?

    I have a couple of problems:

    1. Don’t know how to style it in css. I can’t get it to show up as a block of text with a solid background-color element with padded text (as opposed to just styling the text itself).

    2. Sometimes pieces of the text fall outside of the tags. Generally the tags seem to hop around arbitrarily if I edit the post in the visual editor.

    Thanks for reading, hope this makes sense.

    W

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mrwolfy

    (@mrwolfy)

    #I want something like this block
    #my code is just white in the background
    #the font is changed and that is all
    #plus the tags have an annoying habit of moving
    #also pieces of the cod tend to fall outside of the code
    #style, like

    this

    Thread Starter mrwolfy

    (@mrwolfy)

    Ok I just found a resolution, Seems to work.

    I created a custom div class=code and styled it myself. Only thing is, I will have to write the tags every time I want to post code.

    Hey there. Did you get your issue #2 resolved? I am having the exact same problem, except that it’s happening when I’m only using the HTML editor. (It just doesn’t show me that they’re moved until I switch to Visual and back, or navigate off the page editor and then back again; however viewing the page shows the problem exists.) Instead of leaving the closing tag where I want it, it’s moving it to some arbitrary position within the code I’m posting. The code is actually some PHP that’s designed to add drop=down boxes to another script, so I’m getting the actual boxes showing up on the page instead of the code. Since I’m trying to give instructions on how to modify the existing code for this other script, this is really a problem.

    Thread Starter mrwolfy

    (@mrwolfy)

    Yeah, have not gotten any feedback on this one. Perhaps it is a bug. I read somewhere that you should get rid of the visual editor completely, by turning it off, yet I don’t know how.

    @ VerilyTasha: What I am doing now is making my own div using inline css. Seems to work better. Example below:

    in the html editor I write:

    <div class="code">
    my code here.
    </div>

    then I added this class styling to the style.css of the theme I’m using:

    .code {
    	color: dimgray;
    	font-family: courier, serif;
    	background-color: #EEEEEE;
    	padding: 10px;
    	border: 1px solid #888888;
    	margin: 0 20px 0 20px;
    }

    Of course you can use any colors you want, etc.

    Thread Starter mrwolfy

    (@mrwolfy)

    oops I guess that is not “inline css”…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘html tags acting screwy’ is closed to new replies.