Numbering of code not working properly

This is a discussion on Numbering of code not working properly within the General Discussions forums, part of the Community Boards category; When i read a post,the code (enclosed in the well known tags),is not numbered as it should be.Take a screenshot ...

  1. #1
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675

    Numbering of code not working properly

    When i read a post,the code (enclosed in the well known tags),is not numbered as it should be.Take a screenshot of a random post
    Name:  Screen Shot 2012-09-26 at 7.26.24 PM.jpg
Views: 172
Size:  53.2 KB

    How can i solve it?At the windows laptop it was ok,but in this MacBook Pro (Mac OS X -Version 10.7.5 (Lion))

  2. #2
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,627
    It seems to be a chrome-specific problem. You've already done everything you can to help though.

  3. #3
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    Quote Originally Posted by whiteflags View Post
    It seems to be a chrome-specific problem. You've already done everything you can to help though.
    True.If i go via mozilla,it looks ok,so not the pc that has the problem.

    So can i continue be o chrome and make it work or this is a problem of how the forum is built?(so i can not do anything i guess...)

  4. #4
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    493
    Quote Originally Posted by std10093 View Post
    True.If i go via mozilla,it looks ok,so not the pc that has the problem.

    So can i continue be o chrome and make it work or this is a problem of how the forum is built?(so i can not do anything i guess...)
    I am not a CSS guy, but I did this :
    1)Select any line number in the code, right click, select "Inspect Element"
    2)In the matched CSS Rules, edit the following rule to remove the bolded text(0.5em to 0em):
    Code:
    .syntaxhighlighter table td.gutter .line
    {
    text-align: right !important;
    padding: 0 0.5em 0 1em !important;
    }
    It was back to normal for me in chrome. If you are a regular chrome user, and this solved the problem, install an addon like "Stylish" in firefox(not sure what is the counterpart in chrome) and install this CSS there for URL cboard.cprogramming.com to make it permanent.

    Again, I am not a CSS guy, so if this botches up other alignments I am not responsible
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  5. #5
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    This is a class.If the class is activated in other contents to(which i think it is),then the other contents are going to be disrupted to.However this was a solution,but i do not think that it worths the trying But thanks for it.

  6. #6
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,627
    Because the syntaxhighlighter class has so many places to be relevant...

  7. #7
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    how long did it take to make this colorful world?

    That's not the point however :-p

  8. #8
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,627
    But it is the point. According to CSS rules, subelements, such as table in the example, can only apply to elements on the left (where they are contained). So unless syntaxhighlighter is used elsewhere there is no risk of polluting the page.

  9. #9
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    Correct.But i have an idea.Wouldn't it be much better to have the css code modificated(just a little bit) so that all the user's of chrome could enjoy this tool of numbering the lines of code?

    I mean ok,i can change it,but i will stay on this forum no matter what happens with the browsers.A random person however,is less likely to try finding out why this does not works in his favorite browser and much more likely to go to another forum..Well this may sound too much,but i think that all the details matter

  10. #10
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,627
    You're welcome to go to another forum.

  11. #11
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    Oh come on..don't you understand what i am saying?

  12. #12
    Registered User
    Join Date
    Oct 2006
    Posts
    2,289
    I can't imagine it's especially difficult to change a .css file on a website like this. since chrome is well on its way to becoming the most popular desktop browser, it might be worthwhile to make the change.

  13. #13
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,165
    O_o

    Look at it this way, if you get such a plugin (like "Stylish") you may just fix the code, but you could also send the relevant information to the owner ("webmaster"?) and possible get it fixed for everyone on the same stack which helps this forum.

    Soma

  14. #14
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    Glad that you got my point :-D I 'll give it a try and report back.

  15. #15
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    I tried since yesterday several times and the CSS won't simply load because of restriction rules..But what is happening is that in the code the numbers of lines that are two digit numbers(and more i would say) ,simply does not fit and float to the left.As a result the second digit goes in the next line(where the other number should begin) and so on..
    The solution must be what stevesxmith said on post No.4 .
    So if someone knows the "webmaster" he or she could contact him/her.I don't know him so i can not.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 07-17-2012, 12:56 AM
  2. Not Working properly
    By Tejas Sanap in forum C Programming
    Replies: 7
    Last Post: 05-10-2011, 06:52 AM
  3. Reducing rational numbers - code not working properly
    By adrian2009 in forum C Programming
    Replies: 2
    Last Post: 04-17-2009, 07:42 AM
  4. tic tac toe not working properly
    By h_howee in forum Game Programming
    Replies: 2
    Last Post: 01-01-2006, 12:59 AM
  5. cygwin -> unix , my code not working properly ;(
    By CyC|OpS in forum C Programming
    Replies: 4
    Last Post: 05-18-2002, 04:08 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21