1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Is this code javascript, php or both?

Discussion in 'PHP' started by cscott5288, Feb 13, 2010.

  1. cscott5288

    cscott5288 Active Member

    Messages:
    912
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #21
    TADA! IT WORKED!! Your a genius! What did you fix?

    Now, the only problem I have looks like styling issues ..

    For some reason that DIV containing the generator is way to wide and it won't get smaller.
     
    cscott5288, Feb 13, 2010 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #22
    I just pulled the JS code from the original page. The other code I pulled from an example page and there was a few differences in how it worked. Basically it wasn't getting the category number when called.

    how are you defining the DIV for the result? its using an id so it should be (in your stylesheet)
    #phrase-result { width: 300px; height: 20px; }
    or you could inline it.
     
    shallowink, Feb 13, 2010 IP
  3. cscott5288

    cscott5288 Active Member

    Messages:
    912
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #23
    Yeah, I actually just tried that right before you posted. No, there is something else going on because it is not the div that is causing that. Perhaps there is a padding or a margin on one of the elemets within the blogtopic_generator div? If there is, I can't find it lol. I tried resetting all of these elements just for that div: html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, font, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    b, u, i, center,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td,

    and table. But, for some reason, it's still extending the div to far.

    p.s. the original phrase-result div had an id but it was empty ... it had no styling and I guess it was just given a div by the designer for javascript purposes.
     
    cscott5288, Feb 13, 2010 IP
  4. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #24
    umm according to firebug its doing what its supposed to do. put a border: solid; in the style and it'll show how far its going.

    oh, do you mean the entire thing? looks like you need to define the width for the form and/or table to correct that.
     
    shallowink, Feb 13, 2010 IP
  5. cscott5288

    cscott5288 Active Member

    Messages:
    912
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #25
    Well, the able right now has a width of 1564, according to firefox web dev add on. That must be the problem. But I set the table to:
    div.blogtopic_generator table{
    width: 300px;
    margin:0px;
    padding:0px;
    }

    So, I can't understand why it is still that wide. Trying the form now.
     
    cscott5288, Feb 13, 2010 IP
  6. cscott5288

    cscott5288 Active Member

    Messages:
    912
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #26
    Yes, I can't understand why that table is rendering so wide. I set it to 300px width. There is nothing within it that is that size either.
     
    cscott5288, Feb 13, 2010 IP
  7. cscott5288

    cscott5288 Active Member

    Messages:
    912
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #27
    OK! I figured it out. The dang table wasn't closed so it was spilling into the rest of the page!

    Still more problems though ... it seems when I fixed that, my right sidebar went south ... way south.
     
    cscott5288, Feb 13, 2010 IP
  8. cscott5288

    cscott5288 Active Member

    Messages:
    912
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #28
    And of course! The blogtopic_generator div was not closed -- hence the rest of the page got screwed up. It's all fixed now. Thanks so much for your help shallowink! Rep added.
     
    cscott5288, Feb 13, 2010 IP