Jump to content

floridaflatlander

Members
  • Posts

    671
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by floridaflatlander

  1. I use a switch too for stuff like that, don't forget a default

     

    
    
    $url = basename($_SERVER['PHP_SELF']);
    
    switch ($url) 
    {
    case "/index.php":
    $page_title = 'y';
    $h1 = 'yy';
    $h2 = 'yyy';
    $discription = 'yyyy';
    $keywords = 'yyyyyy';
    break;
    
    default:
    $page_title = 'x';
    $h1 = 'xxxx';
    $h2 = 'x';
    $discription = 'x';
    $keywords = 'x';
    break;
    }
    
    

     

    You can add an image name for a page

  2. I used the book "php soluitons" to learn how to do it, There is a PDF version on line, I have both (they're the older versions and as a note you can get the older book at amazon for a deal. The newer one deals with photo uploads and such but works more with objects).

     

    I move my photos from the servers temp folder and create both a large photo for display and a thumb nail at the same time. Reducing the quailty(pixal size) for the internet, I use 50 with no problem.

  3. Stuff like that can work, sometimes I use <br class="clear"/> then make s style called .clear also try margin-bottom on the main wrapper, when stacked on top of one of another one of the margins takes precedence(I think), I can't remember how it works though. Also when things are floated that also has an effect.

     

    When people start getting online today I'm sure you get more and better ideas.

  4. I don't understand why the padding isn't being applied to create a gap between mainWrapper and footerWrapper.

    
    footerWrapper {
    clear: both;
    width: 100%;
    height: 50px;
    padding-top: 20px;
    background: url('images/footer.jpg') repeat-x;
    }
    

     

    I have a hard time with these spaces too sometimes, padding is on the inside of your div. and uses the same background color or image as the div. Margin is on the out side of the div and puts spaces between them. Try margin-top

  5. The `Pid` is not always nubmers.  There is no "index" due to this.

     

    How big is your table, can you make a column fill it then rename it an auto increment column or build another table?

     

    Also I have a small site but my picture info db has auto increment and then I use three queries to retrieve the display pic, the next pic and the previous pic. I'm sure there are better ways but like I said it's a small site.

  6. Thanks All

     

    The {word-wrap: break-word;} worked like a charm however I check with w3.org and it said "Property word-wrap doesn't exist :"  But I'm still going to use it, I played with it in ie7, 8 & firefox and it worked great.

     

    I looked at php.net and wordwrap() may not do what I want because even though the index page will have thumbnails the picture page would need the full unbroken title or there abouts because the picture would have more room on it's own page.

     

    Thanks again I'm going to work with them both more as I get more time tonight and tomorrow.

  7. How would I use substr() to limit word length?

     

    I can use it to limit a string like $title = substr ($title, 0, 100);

     

    But I want to limit the size of a word in the string.

     

    So if I have var thats $title = " A Cow Jumped Over The Mooooooooooooooooooooooooooooooooon" how can I change it to " A Cow Jumped Over The Mooooooooooo oooooooooooo oooooooooon" for the reason listed above.

     

     

    Thanks for the reply

  8. I have a div 120px in width that contains a thumb nail and a title under it.

    My problem is if a word in the title is over X (20+ I think) characters the div gets wider to hold all the characters in a word.

     

    I can limit the string length with substr, but I want to limit the length of a word in a string.

     

    How do I limit a words length?

     

    Thanks

    S

  9. You can't unless you have all the info in the same h1 tag, I'm guessing your wanting big letters at certain parts of your paragraphs.

     

    You can use spans like this

     

    <p><span class="large">Start of paragraph</span>and here is the rest of the paragraph.</p>

     

    Then do a style the style "large" however you want ot to be.

  10. Update.  It is happening when I add any height to the center div. 

     

    I meant a width of 895px total for the left center and right div.

     

    And yes I'd make a width of 895 total or 890 for all the divs in ie 8 or ie 9

     

    It's like the right div doesn't realize it's supposed to be "beside" the middle div.

     

    Are you missing a closing </div>

  11. I had to use htaccess and have a record with a field with the users name. When users register the db is searched for a simular name, if one already exist the user is given another name.

    Get searches for the name in my case.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.