Wednesday, 30 September 2015

[CSS/HTML/PHP] Help: Can't produce divs in a managable way, from PHP script. Need help styling divs with CSS.

Hello web_design! I was put in the direction of this subreddit after posting on /r/learnprogramming with a web-design related issue I'm having. I'm an average skilled webdesigner who's run into an issue after taking over a project for someone else, which I thought was a fitting challenge. I am supposed to write a neat looking calender, and I've got everything set up in PHP and the PHP is even drawing event-data from a SQL database. So far so good. However, when I print out the eventlist - the calender so to say - to my monitor it doesn't look as intended. I want to print 3 rows with 4 colums, adding up the months in the year, wherein I can present the events that are upcoming. So, Jan-Feb-Mar-Apr on the first line, the next 4 months on the next line(row) and so on. Here's a quick visual of what I mean:

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

My current script or setup however, isn't really allowing me to move stuff around as freely as I was expecting. After taking over the project I have cleaned up the HTML and the code, making it easier to work with, but now I've run into a real headache. This is a screenshot of how it currently looks: http://ift.tt/1QKYBpo.

My code can be found here: http://ift.tt/1LjTMFx It is my plan to style the page using bootstrap, but I can't quite wrap my head around how I'm supposed to go about it. Right now the code is just printing all the months in one long list with no regard for design. I want it to display in a few more colums and later on add a 'text-sneak-peek' kind of thing where you can only view X amount of letters as a preview on each event. This is just to make the styling more alike overall.

As you can tell by the source, I am planning on using bootstrap once I know how to work with my divs, but I don't really know how as they are all printed through PHP and as such the divs share a class. I also want to note there is something unexpected going on: In cases where a month has multiple events, like September, only the first event is attached to the heading 'September'. The rest of the events for that month generate their own div with the same class.

Am I doing something wrong?

Any help much appreciated!



Epic visual tool

Epson 5030UB 2D/3D 1080p 3LCD Projector Submitted September 30, 2015 at 01:49PM by Gregersen12 http://ift.tt/1OG3PW1

No comments:

Post a Comment