Forum Moderators: coopster

Message Too Old, No Replies

CSS not taking into account PHP generated code

         

andrewheiss

9:14 pm on Apr 14, 2008 (gmt 0)

10+ Year Member



I'm working on a dynamic site that generates sidebars automatically with PHP/MySQL. The CSS works perfectly if I use static HTML, but when I use the PHP generated HTML, it only styles height according to what is in the code before the PHP is run.

Here's what I'm talking about.

The only static HTML is the title. The sidebar goes out of the div - the div doesn't stretch down to the bottom of the sidebar.

Now there's a static textarea and input. Div stretches to the bottom of the content, but not the sidebar.

Again, it works fine if I hand code the HTML.

How do I get around this, making it so the CSS will kick in after all the HTML has been generated? I tried using the output buffer but it kept doing the same thing... Weird...

[edited by: jatar_k at 11:28 pm (utc) on April 14, 2008]
[edit reason] no urls thanks [/edit]

londrum

9:19 pm on Apr 14, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



it's likely to be something else, as the browser only ever gets the completed HTML. the php is processed server-side.

have you compared the two codes to make sure they really are identical? maybe you have missed out a class or something on the generated version, or forgotten to close a quote mark around a class, or something simple like that.

andrewheiss

10:11 pm on Apr 14, 2008 (gmt 0)

10+ Year Member



Wow. So, that error is actually a css mistake. I wasn't clearing the float. That was easy.