Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > php includes

php includes
Thread Tools
Mac Enthusiast
Join Date: Jul 2003
Status: Offline
Reply With Quote
Feb 23, 2006, 10:55 AM
 
I am using a set of php scripts as user authentication. There are a number of "front end" pages that users can go to, such as a login screen, etc. But, you can also do a php include so that the html from the various php pages just gets embedded in your own documents.

All the front end pages are center justified. When I do a php include to bring in the html the entire document (not just the included html) becomes center justifed- including my sidenav text. Is there a way to overrided the css that dictates this? Can I put something in my document that overrides whatever css might come with the included file?

I hope this is not too vague.
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Feb 23, 2006, 02:31 PM
 
... er can you not make a class for the stuff you want non-centered with attributes like "text-align: left" , "align: left" or whatever?

Isn't that the whole point to cascading style sheets? being able to override and all that?
     
Mac Enthusiast
Join Date: Jul 2003
Status: Offline
Reply With Quote
Feb 23, 2006, 03:23 PM
 
skalie,
you're talking to a novice.
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Feb 23, 2006, 04:05 PM
 
We're all novices, even those of us that don't realise it anymore.

If I understand it correctly, if you link a style sheet, or include it, you can then override it with a stylesheet under it in the header, then override it even later by adding attributes in the actual tags.

I'm not very clever with the correct terminology, but I'm hoping you get the gist of what I'm saying.
     
Senior User
Join Date: Nov 2003
Location: Middle of the street
Status: Offline
Reply With Quote
Feb 23, 2006, 06:02 PM
 
How about giving a sample page or in-line example?
     
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status: Offline
Reply With Quote
Feb 24, 2006, 01:48 AM
 
Skalie's right, this is why they're called Cascading style sheets. They're meant to flow downward.

As it is, you could write your PHP to trim the tags out of the include that you don't want.
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Feb 24, 2006, 07:44 AM
 
Do you have a link? It sounds like something in the PHP include may be doing something strange to the HTML code in the page.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:30 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2