PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 30, 2022

[FIXED] PHP errors messing with site look

 January 30, 2022     codeigniter, error-handling, php     No comments   

Issue

I have a website built mainly with php. The problem i have is at the top i have a div with a background image. It has to be in a very specific place. Every time there is a PHP error the div gets moved down which then makes the page look bad.

I can think of two possible solutions but i dont know how to do them and searching the web has been a fruitless effort.

  • Make it so the php error doesnt push the div down (i tried float but the div has other things in it that need to be on the left side while the image is on the right)

  • Make the php errors appear elsewhere. (I have no clue how to do that and couldnt find anything)

Im using codeigniter. Thanks for the help.


Solution

All the above answers are the correct way to produce PHP CodeIgniter codes.

But to answer your question, if you have a personal preference, you may want to try using the z-index property when you define your image css.

It doesnt move your errors down, but your image will always be in the position you fix if the z-index of your image is higher than the z-index of the div that contains your errors.

https://developer.mozilla.org/en/CSS/Understanding_z-index



Answered By - He Hui
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing