473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

PHP problem, or is the CSS at fault?

This is driving me crazy... I've spent, literally, a week trying to solve this (probably very silly) problem – to no avail. Help please!

The code below shows the PHP with the relevant CSS for structuring the left and right columns of a standard 3-column fluid layout. The problem is that the left column is simply not appearing. Any theories will be received with eternal gratitude; any solutions – with a million dollar cash award (as soon as I become a billionaire, that is).

MY PHP:

<!-- LEFT COLUMN -->

<?php

$highclcwidth = "<div id=\"lchighc\" class=\"column\">";
$nonhighclcwidth = "<div id=\"lcnonhighc\" class=\"column\">";

if ($page == "high c") {echo $highclcwidth;}
else {echo $nonhighclcwidth;}

?>

<?php
include ("phpinserts/iilc-text.php");
?>

</div>

<!-- END LEFT COLUMN -->



MY CSS:

#container .column {
position: relative;
float: left;
padding-bottom: 20010px;
margin-bottom: -20000px;
}

#lchighc {
width: 134px;
padding: 0 10px;
right: 230px;
margin-left: -100%;
margin-top: 507px;
z-index: -2; top: 202px;
background-color: #efdfff; border-right: 1px solid #000000;
}

#lcnonhighc {
width: 134px;
padding: 0 10px;
right: 230px;
margin-left: -100%;
margin-top: 507px;
z-index: -2; top: 202px;
background-color: #efdfff; border-right: 1px solid #000000;
}



The mystery is that the right column works fine, despite having no substantial code differences. Here it is for comparison:


My PHP:

<!-- RIGHT COLUMN -->

<?php

$highcrcwidth = "<div id=\"rightcolumnhighc\" class=\"column\">";
$nonhighcrcwidth = "<div id=\"rightcolumnnonhighc\" class=\"column\">";

if ($page == "high c") {echo $highcrcwidth;}
else {echo $nonhighcrcwidth;}

?>


<img src="images/ software-box-big.jpg" alt="Link to this site" class="adformat"/>
<img src="images/ order2.jpg" alt="Link to this site" class="adformat"/>


<p>
Current date + time:
<?php
echo date( "F d Y h:i:s", getlastmod() );
?>
</p>

</div>

<!-- END RIGHT COLUMN -->


My CSS:

#rightcolumnhighc {
width: 162px;
padding: 0 10px;
margin-right: -229px;
z-index: 3; top: 160px;
background-color: #efdfff; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: solid #000000;
}

#rightcolumnnonhighc {
width: 162px;
padding: 0 10px;
margin-right: -229px;
z-index: 3; top: 160px;
background-color: #efdfff; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: solid #000000;
}



Thanks,
Matheson
Nov 19 '06 #1
5 1626
What's in phpinserts/iilc-text.php?
Nov 20 '06 #2
only text for the left column ("lc") - nothing else whatsoever
Nov 20 '06 #3
moishy
104 100+
Just a little off the subject:

I see you use the "cancel quote":

$str = "somthing \"with\" a quote";

However, more siple and more correct:

$str = 'somthing "with" a quote';

Notice how I changed quote types from double quote to single.
Nov 21 '06 #4
This is driving me crazy... I've spent, literally, a week trying to solve this (probably very silly) problem – to no avail. Help please!

The code below shows the PHP with the relevant CSS for structuring the left and right columns of a standard 3-column fluid layout. The problem is that the left column is simply not appearing. Any theories will be received with eternal gratitude; any solutions – with a million dollar cash award (as soon as I become a billionaire, that is).

MY PHP:

<!-- LEFT COLUMN -->

<?php

$highclcwidth = "<div id=\"lchighc\" class=\"column\">";
$nonhighclcwidth = "<div id=\"lcnonhighc\" class=\"column\">";

if ($page == "high c") {echo $highclcwidth;}
else {echo $nonhighclcwidth;}

?>

<?php
include ("phpinserts/iilc-text.php");
?>

</div>

<!-- END LEFT COLUMN -->



MY CSS:

#container .column {
position: relative;
float: left;
padding-bottom: 20010px;
margin-bottom: -20000px;
}

#lchighc {
width: 134px;
padding: 0 10px;
right: 230px;
margin-left: -100%;
margin-top: 507px;
z-index: -2; top: 202px;
background-color: #efdfff; border-right: 1px solid #000000;
}

#lcnonhighc {
width: 134px;
padding: 0 10px;
right: 230px;
margin-left: -100%;
margin-top: 507px;
z-index: -2; top: 202px;
background-color: #efdfff; border-right: 1px solid #000000;
}



The mystery is that the right column works fine, despite having no substantial code differences. Here it is for comparison:


My PHP:

<!-- RIGHT COLUMN -->

<?php

$highcrcwidth = "<div id=\"rightcolumnhighc\" class=\"column\">";
$nonhighcrcwidth = "<div id=\"rightcolumnnonhighc\" class=\"column\">";

if ($page == "high c") {echo $highcrcwidth;}
else {echo $nonhighcrcwidth;}

?>


<img src="images/ software-box-big.jpg" alt="Link to this site" class="adformat"/>
<img src="images/ order2.jpg" alt="Link to this site" class="adformat"/>


<p>
Current date + time:
<?php
echo date( "F d Y h:i:s", getlastmod() );
?>
</p>

</div>

<!-- END RIGHT COLUMN -->


My CSS:

#rightcolumnhighc {
width: 162px;
padding: 0 10px;
margin-right: -229px;
z-index: 3; top: 160px;
background-color: #efdfff; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: solid #000000;
}

#rightcolumnnonhighc {
width: 162px;
padding: 0 10px;
margin-right: -229px;
z-index: 3; top: 160px;
background-color: #efdfff; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: solid #000000;
}



Thanks,
Matheson
Hi !
Why do you have ...

"margin-left: -100%;"

in both "lchighc" and "lcnonhighc" ?

I think , if you change that "%" to "px" it will work.
Good Luck !
Nov 29 '06 #5
ronverdonk
4,258 Expert 4TB
It is time you guys read the Posting Guidelines for this forum!!
NEXT TIME ENCLOSE YOUR CODE WITHIN PHP, CODE OR HTML TAGS!! READ THE POSTING GUIDLINES BEFORE POSTING ANYTHING IN THIS FORUM! -

Ronald :cool:
Nov 29 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Ian Stanley | last post by:
Hi, Continuing my strcat segmentation fault posting- I have a problem which occurs when appending two sting literals using strcat. I have tried to fix it by writing my own function that does the...
37
by: Patrik Huber | last post by:
Hello! I got the following Code in Assembler (NASM), which prints out "5" in realmode: mov ax, 0xB800 mov es, ax mov byte , '5' I want to do the same in gcc now, but I'm stuck. GCC...
0
by: Ashwin Kambli | last post by:
I need to build a "fault recovery" web service on a Win 2K server box. The fault recovery is provided for a server process which runs on a Linux box. Whenever this server process goes down, the...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
0
by: Matt S | last post by:
Hello, I'm trying to build a C# client to consume an AXIS Web Service (running SOAP over HTTP). The Web Service encodes full server-side exception traces in the Soap Fault > Detail element...
0
by: Alexiel | last post by:
Hi, i have a problem, I have a Java Client and i call my webservice on ..NET. This run perfectly just except when i send parameters don't work fine. I send my code : This is my java...
7
by: Salvador | last post by:
Hi, I am using WMI to gather information about different computers (using win2K and win 2K3), checking common classes and also WMI load balance. My application runs every 1 minute and reports...
2
by: jiang.haiyun | last post by:
Hi, I am having some serious problems with PyQT4, when i run pyqt script, I always get 'Segmentation fault'. the script is simple: ====================== %less qttest.py from PyQt4 import...
2
by: =?Utf-8?B?c2hvcnRnaXJs?= | last post by:
while i'm on different sites (myspace the most) i get this message IE not working: Problem signature: Problem Event Name: APPCRASH Application Name: iexplore.exe Application...
4
by: gcharbon | last post by:
Hi community, I have a problem with a Soap client written in php. I have a local server (coded in c and a client in c too, it works fine), but i want to test client in php, and i have an error...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.