Forums

code alignment (3 posts)

  1. hbalagh
    Member
    Posted 3 years ago #

    Ok i have my blog so it's all justified text, how ever when i disply code i don't want it to be justified i want it just regular left alligned, i thought if i placed the following in my css it would work but it's not

    code {
    text-align: left;
    }

  2. katie1
    Member
    Posted 3 years ago #

    maybe if you try to wrap your code in an outer div...

    .codeblock {
    text-align:left;
    clear:both;
    margin:0;
    padding:0;
    }

    see how that goes.

  3. Viper007Bond
    Member
    Posted 3 years ago #

    I just client-side added this to the bottom of your stylesheet and it worked fine:

    code { text-align: left; }

    (I have a great Firefox extension that allows me to do that.)

    Did you hard refresh after editing your stylesheet? (Control + F5) Your browser caches the stylesheet and often any changes won't appear right away unless you hard refresh.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.