Web Design Forums

Welcome! Please register or log in: Forgot your password? Why register?
You are here: Web Design Forums » Programming Help » PHP » Problems with PHP positioning RSS

Problems with PHP positioning

This thread was started by DGS and has been viewed 731 times, and contains 12 replies, with the last reply made by DGS.
Post Reply
1
View DGS's reputation
DGS, WDF User Private message  
Posted June 22 '09 at 12:15 AM
      Posts: 25
Alright, so I'm having trouble with my PHP scripts repositioning my pages.

I'm using CSS and have different div's for different sections.

The only section that's messing up is the section that contains the script.

Everything gets pushed to the far right with the script.

Here is a normal page without the PHP script: http://deadlygamingstudios.vlexo.net

And here is a page that is pushed to the far right with the script:
http://deadlygamingstudios.vlexo.net/members/login.html


I changed nothing in the CSS. All i did is pop the PHP code in where I put my normal HTML and text.
Last edited June 22 '09 at 12:47 PM by DGS. Reply

Advertisement Register for free to hide these ads and participate in discussions!

2
34 points at 74%
Dorky, Freelance Home page   Private message  
Posted June 22 '09 at 02:09 AM
      Posts: 782
it looks like you have some html tags without closings. you may need to refine your echo commands. also i dont see your css but all it takes is one missed bracket, more often then not that will result in a left pull though.
i would just be sure your php is clean.
“Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire world, and all there ever will be to know and understand.” Albert Einstein

3
View DGS's reputation
DGS, WDF User Private message  
Posted June 22 '09 at 03:50 AM
      Posts: 25
Thanks Dorky.

The thing is, it's happening on an html document without any php scripts on it too. So it can't be just the php.

I think it's just my css sheet in that particular directory.
But what could the problem be?

4
34 points at 74%
Dorky, Freelance Home page   Private message  
Posted June 22 '09 at 01:57 PM
      Posts: 782
overflow : auto; is a default value. no need to declare

!important not serving any purpose at this point as body will always be lowest indexed.

clear needs to be declared with float not separately.

that all i see as far as css. but like i said i did see some open html tags in the source.
“Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire world, and all there ever will be to know and understand.” Albert Einstein

5
View DGS's reputation
DGS, WDF User Private message  
Posted June 22 '09 at 05:32 PM
      Posts: 25
You saw open HTML tags on the log in page source?
Can you please specify where?

And I'm having trouble pinpointing what you're talking about in the CSS.

The overflow : auto; is only included in a special div called "code." I do not use that div anywhere on my site, so I don't think that will affect anything.

The !important; is used so that the Google auto-fill feature that comes with the Google toolbar doesn't turn my form fields yellow, causing the white text entered in them to be un-readable.

And where is the 'clear' code you're talking about?
Do you mean the clear with the .br class?
That's not included on the section of the page with the content either, so I don't see why it would affect this page and not my others.

I still don't understand why this is only affecting pages in the /members directory of my site.
Last edited June 22 '09 at 06:10 PM by DGS. Reply

6
34 points at 74%
Dorky, Freelance Home page   Private message  
Posted June 23 '09 at 04:35 AM
      Posts: 782
sorry man i actually i didnt cross check the two for class. what i did see, the <p> tags open. i will play with some of the code in the morning and see if i can recreate it.
the clear was a clear: both;
either way im sure its a syntactical error.
“Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire world, and all there ever will be to know and understand.” Albert Einstein

7
View DGS's reputation
DGS, WDF User Private message  
Posted June 23 '09 at 03:00 PM
      Posts: 25
Oh, no, it's cool. I'm just glad you're trying to help me.
I'm looking for the open <p> tags, but I haven't found them yet. But I'll check again.
I'll look at the clear again too.

But do you think you know why it's only happening to those pages in that certain directory?

8
32 points at 100%
Posted June 23 '09 at 07:26 PM
      Posts: 76
Sorry I can't help bud, those pages aren't loading for me =(
Lead Web Designer
MLW & Associates, LLP.
W3C Standards Complaint and SEO Friendly
Admin of Vraul

9
View DGS's reputation
DGS, WDF User Private message  
Posted June 23 '09 at 08:01 PM
      Posts: 25
They aren't loading? Oh, wow.

Try these.

http://deadlygamingstudios.vlexo.net/

http://deadlygamingstudios.vlexo.net/members/login.html

10
32 points at 100%
Posted June 23 '09 at 08:10 PM
      Posts: 76
Where you have:

 <div id="content">

<font size="2">

Add,
<h3>something</h3><p>
before the font tag and after the div tag...

Before the footer starts, end the p tag... it seems that your site's CSS depends on those elements in order to position those blocks properly.
Lead Web Designer
MLW & Associates, LLP.
W3C Standards Complaint and SEO Friendly
Admin of Vraul

11
34 points at 74%
Dorky, Freelance Home page   Private message  
Posted June 23 '09 at 08:21 PM
      Posts: 782
that kinda funky though. i dont know i would use complex tags rather then find and fix the actual issue.
“Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire world, and all there ever will be to know and understand.” Albert Einstein

12
58 points at 100%
imagn, WDF Addict! Home page   Private message  
Posted June 23 '09 at 10:58 PM
      Posts: 156
On line #113 of your CSS the "container" div was set to float right. If you change

#content { float: right; width: 510px; margin-top: 30px; margin-left: 2px; }

to

#content { float: left; width: 510px; margin-top: 30px; margin-left: 2px; }

you get

http://www.imagndesign.com/_testing/dgs.html

13
View DGS's reputation
DGS, WDF User Private message  
Posted June 23 '09 at 11:13 PM
      Posts: 25
Oh, wow.
Lots of solutions here.
Thank you both, I'll give both of them a try and see what happens.

EDIT::

Thank you both, both of your solutions help me fix it.

@ imagn:
I'm just confused on why the float right only affected pages in the /members directory and not in my main site.
Last edited June 23 '09 at 11:21 PM by DGS. Reply

Post Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Top 21 PHP Programming mistakes thexchord PHP 18 March 10 '10 09:52 AM
Php code problems longstand PHP 2 October 9 '07 08:17 AM
Problems with installing PHP and Apache Hideo PHP 3 December 1 '06 02:00 PM
PHP mailing list problems.... Melancholicmike PHP 2 January 5 '06 05:30 PM
PHP Problems Samibouni PHP 14 January 7 '04 11:41 AM