Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts

    style within div

    Hi im working on this pet project:

    http://www.actwebdesigns.co.uk/web-d...e-function.php

    its a function in php that loads in scripts and ouputs them to the browse.


    pre.odd { background-color: #F4F4F4; }
    pre.even { background-color: #a0d3a5; }
    pre.even, pre.odd { margin:0; padding:5px; font-size:12px; color:#404040; border-top:1px solid #404040;}
    div.codeBlock { width:800px; overflow:auto; margin:0 auto; border:1px solid #404040; border-top:none;}
    pre span.lineNo { color:#C60; }


    problem being if you scroll across at the bottom the coloured lines stop and do not continue. Anyone know why?
    Website Design Mansfield
    PHP Code:
    function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
    echo 
    I_LOVE(); 

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,630
    Thanks
    6
    Thanked 1,002 Times in 975 Posts
    Because you told your pre elements to be 550px wide and the code is longer, hence overflowing. And even without that width the elements would be 100% wide relative to the parent element’s width (which is 550px).


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •