logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > HTML and CSS
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-29-2015, 07:55 PM   #1
Grimbold7
 
Join Date: Jul 2015
Location: Exeter,Devon, England
Posts: 3
Question printing a PHP form without a header

Hi all,
I am a newcomer to web building as our club needed a volunteer to run an existing website. my question is - how do I remove a css rule from a single page so as not to effect the rest of the webpages, members enter our annual comps on line through a data base and our comps secretary prints them off but as the whole page is printing including the header and php menu bars he cannot get it all on one page but he could if I can stop it printing the unwanted elements.
Any help please would be appreciated
Grimbold7
Grimbold7 is offline   Reply With Quote
Old 07-30-2015, 02:04 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

Hi , first welcome to the forum.
Quote:
how do I remove a css rule from a single page so as not to effect
there area few ways to do this, css rule specific to page( <body> ) id.
an on line style in the head using an !important might work.


as you are concerned about printing then a media call or a seperate print media sheet with display;none on the unwanted items.
Code:
@media print {
   
}
if you give a web address we can have a look for you
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 07-30-2015, 03:56 PM   #3
Grimbold7
 
Join Date: Jul 2015
Location: Exeter,Devon, England
Posts: 3
Default

Thanks for your quick response, I will give you the URL of the club - www.woodburywoodturners.org.uk
I don't know how much help that will be for you as the print form is not on it and members have to log in to get the competition menu. would it help if I let you have the css style coding that is attached to the print form page ?
Grimbold7 is offline   Reply With Quote
Old 07-31-2015, 01:08 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

no thats ok. might need code for the page but try this first, add to your style sheet

@media print {
#navcontainer,footer{display:none:}
}
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 07-31-2015, 01:10 AM   #5
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

BTW on the index page you have around line 71-75

Code:
      <div id="navcontainer">
                    </div>
        
         <div id="navcontainer">
                    </div>
delete them, they do nothing and you can only have 1 instance of an id on a page
i just checked thay are on other pages too
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 07-31-2015, 04:13 PM   #6
Grimbold7
 
Join Date: Jul 2015
Location: Exeter,Devon, England
Posts: 3
Default code

Thanks again for your advice, I have looked at the said lines in the "view source" for the index page but when I look at the same code in DW it looks like this -
else {include ('../includes/menu11.php'); }?>
</div>
<div id="navcontainer">
<?php if (isset($data)) {include ('../includes/menu2.php'); } ?>
</div>

<div id="navcontainer">
<?php if (isset ($data['id']) && $data['id'] == '666'){include ('../includes/menuadmin.php'); }?>
</div>
so do you still think it is safe to remove them ?
If I do will it help with the print form problem that I am trying to overcome ?
Thanks again
Attached Images
File Type: jpg DW-events-page-code .JPG (39.7 KB, 2 views)
Grimbold7 is offline   Reply With Quote
Old 08-01-2015, 12:53 AM   #7
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

thats just bad coding. it will create multiple navigation divs
not knowing the conditions i will only be able to give a best guess but 1 way, based on the cose you show would be
Code:
<body><div id="navcontainer">
<?php if (isset($data)) {include ('../includes/menu2.php'); }
elseif (isset ($data['id']) && $data['id'] == '666'){include ('../includes/menuadmin.php'); }
 ?>
</div>
etc and add the other include in that
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 08-01-2015, 01:02 AM   #8
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

another way would be leave the conditions as is but remove the
<div id="navcontainer">
....
</div> tags but add them at start and finish of the included files
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting 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

Forum Jump


All times are GMT. The time now is 09:55 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com