Jump to content

PHP while loop creating multiple records as CSS DIVs but nesting these


Canaan

Recommended Posts

I am creating a review page for a website where each review is stored in a SQL database. These records are then outputted to a page in CSS DIVs to structure the records on page. However, each record is nested inside of each other on the page once the while loop is done outputting the whole table. I'm not sure how to stop this nesting effect as I have been stuck on this for a few days with no result. This is just a logical error as there are no syntax errors in the page inspect console. The link to the page is here and the divs that are nesting are labeled refrecord, infocontent and socialmedia. http://canaan-canaan.codeanyapp.com/AlwaysBeeBuilding/Reviews.php i have also attached a expected result image showing what i wanted it to do then an actual result image which is what is currently happening. I need it to be like the one where all the divs are next to eachother.

 

 

- the images arent uploading

Link to comment
Share on other sites

When you say nesting it sounds like the divs are all inside each other instead of being individually defined.  My guess is you are missing the ending div tag in your loop.  

 

Of course you could be using the word nesting in a completely different sense, but nah,  you wouldn't do that.....

Link to comment
Share on other sites

When you say nesting it sounds like the divs are all inside each other instead of being individually defined.  My guess is you are missing the ending div tag in your loop.  

 

Of course you could be using the word nesting in a completely different sense, but nah,  you wouldn't do that.....

Thankyou but it was one of those situations where i had to rewrite the situation then found out there was a spare single speech mark left over ahaha cant beleive ive spent like two weeks on this

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.