[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Problem with php display

Posted on 2016-08-21
7
Medium Priority
?
85 Views
Last Modified: 2016-08-25
I'm having a problem with a display with php.

Here's the deal and it may seem complicated.

In Manhatten a block measures 200 feet, so each side of the street the frontage of all the stores should total 200 feet.  
Go trust a client to make sure the data is correct!  Sometimes the block was 130' and sometimes it was 275'.  So what I did was add up all the frontages on left and right sides of the page (2 different variables) , divide those number into 200.  This way I could multiply the individual store frontage by the result that I got to set the height of the rows in the left and right tables for each store front.

The logic works but the results are not correct. I've checked the frontages and they do add up.
The display in the lower left corner shows the left and right frontage totals.  "lm" is the left multiplier that I'm using.

Attachments:
1:  good_screen_1.odg
This is what the screen should look like if the client entered the data correctly.  Left and right  both add up to 200 and the multiplier is one.

2: good_screen_2.odg
Dummy can't add the left side.  So I take the 150 and multiply it by 1.3333333.  It works

3: bad_screen.odg
This is where it gets weird.  The left, right and multiplier are the same as in "good_screen_1", but the left hand table looks like it's dropped by maybe one or two pixels.  This forces the "south" street names to be forced to the right.

I hope I've explained this clearly.
good_screen_1.odg
good_screen_2.odg
bad_screen.odg
0
Comment
Question by:breeze351
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 41764666
What is the question?  And what program should we use to open "odg" files?
0
 
LVL 9

Expert Comment

by:Brian Tao
ID: 41764781
All 3 screenshots have more or less difference in height, by 1 to 3 pixels.  It looks like it's dependent on number of storefronts, so my best guess is the "border" attribute is affecting the display.
Better if you can post your code, where you prepare the "store block", to this ticket.

And if posting code is not an option, one of the solutions you may take is to wrap the stores divs (and the middle avenue) in a wrapper div, so that the bottom street is always below it.
0
 

Author Comment

by:breeze351
ID: 41767510
Brian:
I modified the css to as follows:

#map_wrap
{
      width: auto;
      height: 220px;
}

Then added the following to the code:
            <div id="map_wrap">

The attached file had the display code for the page.  It does get complicated (Sorry about that).




Ray:
It's "Open Office".
map_lr.php
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Accepted Solution

by:
Brian Tao earned 2000 total points
ID: 41769063
I cannot investigate the root cause without having your code for the entire page.  By looking at your php-let "map_lr.php" my guess is that the border of your <tr>'s are causing the misalignment, so you'll always get a higher table on the side with more stores (hence more <tr>'s).
Maybe you can provide a test user/pass so that I can have a look at the Lansco page itself?

Anyways, 2 questions:
1) did you put the horizontal streets outside of the new "map_wrap" div?
2) does it still have the same display problem after you added the div?

You may also try adding the following css styles:
1) add overflow: auto; to your #map_wrap css block.
2) add style="clear: left;" to the tag where you display the "south" street names

Good luck!

Modified: This is not a PHP question, but rather a CSS/HTML question.
0
 

Author Comment

by:breeze351
ID: 41769543
Brain:

Attached is the entire code.

The url is

The login is "test" and the password is "fred".

Goto "walk by map".  Start with the address of "390" and the street "5th".

Both sides are at 200'

Start walking up the street (address +).
The next block both sides are screwed up but the display using the multiplier is correct.

Go one more block up and the display is screwed up.
a) The left side has only 1 building ,2 stores and the frontage is correct
b) The right side has 2 buildings, 5 stores and the frontage is incorrect.

I can see that the left is a couple of pixels longer.  This just doesn't make sense.

If you can't help with this,  how can I move this question to css/html.

Thanks
Glenn
0
 

Author Comment

by:breeze351
ID: 41769545
My bad, I forgot to attach the code.
Walk_Map_Display.php
0
 

Author Closing Comment

by:breeze351
ID: 41770753
I'm opening the question in css/html
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question