December 19th, 2012, 07:53 PM
Float isn't floating, it's sinking! ;-)
Never had this happen before and I'm by no means a CSS expert.
I develop in php and this current application is heavy on MySQL calls.
So for the medtext fields I'm adding a nl2br to make sure I maintain carriage returns from what was entered.
My problem with the CSS is I have an image to the right. With that php code it adds two line breaks for the carriage returns. Those breaks kill the float so the next "paragraph" will not appear until the bottom of the image.
Obviously I need to clear something. I've tried clearing both on the image to no avail.
Both text and images are in the same div of course.
I'm beginning to think it worth my time to just make two divs. one for the pic and one for the text.
What needs to be cleared???
December 19th, 2012, 07:55 PM
Do you have a link to your site or the php?
December 19th, 2012, 07:56 PM
I figure you're going to want to see the code. The CSS first:
Now the code after the variables are set and my loop begins...
I went ahead and threw in the variable with the nl2br setting since that's the one I'm having trouble with.
$info = nl2br($info);
echo "<div class='clear_all'></div><div id='events_holder'><img src='/NewOrchard/$pic' class='img_event' />
<p><a href=\"http://$link\" target=\"_blank\">$linkTxt</a></p>
And so it's not confusing... $pic is just the name of the image in the uploads folder where it went when the event was created.
December 19th, 2012, 08:02 PM
I do. The page I'm working on currently is here:
Originally Posted by Nanomech
well...says new users can't post URL's.
December 19th, 2012, 08:10 PM
Since I can't post a URL (goofy rule) look at the php code above and just before $pic you will see /NewOrchard/
Originally Posted by Nanomech
Just before that do the usual go to web page stuff but add orchardmidland. Then instead of $pic put in orchard_youth dot php.
Make sense? ;-) How's that for a work around?
December 19th, 2012, 10:45 PM
December 19th, 2012, 11:11 PM
Thank you for posting my link for me. Should be getting to about 5 now if replies count :-) Trust me, I fight stupid spam all the time on forms and such. I HATE Captcha so you should see my php filter functions I run everything through just to submit a stupid contact form.
Originally Posted by Kravvitz
But I digress, no I had not ran it through those. I did run the php code (of course it read the rendered html) and it came back with a bunch of "alt name not specified" for images. I do that later in the developing process. I know...I know.. SEO.
I ran the CSS through there and it came back with no errors.
But great links. I book marked them. You never know when you forget to close a link or something. That's going to be a very handy tool.
December 19th, 2012, 11:12 PM
How about that? That last reply made 5 so now I can post URL's!
Originally Posted by dpiearcy
Doing the happy dance.
December 19th, 2012, 11:27 PM
Now that I can post URL's the page in question is indeed orchard midland
The events at the bottom you will notice with php adding two line breaks for the carriage return the second paragraph will not float. It drops below the image.
BUT... while you're there, just for fun I had an idea. Click on the home link on the top menu. This will, of course, take you home (index). So I thought...if you were on the home page why would you click this link?
So with php I decided to find out what page they were on and write and if and else if statement and declaring a variable of page. Then, if you are on the home page it equals one thing or if you're on any other page it will equal index.php and function correctly.
So once you're on the home page, hit that home button. I thought it was funny. Not sure what the church I'm developing this page for will think though :-)