...

View Full Version : Resolved Css Hiding Divs Need Help



unknownsoul
11-27-2008, 12:37 AM
Hello, I'm wondering if there is a simpler way of hiding divs you don't want showed on one stylesheet but do on another.

This way works prefect however it will cause alot of coding to be wrote for every div that shouldn't be showed.

Style sheet one


#footer1 { }
#footer2 { display:none; }
#footer3 { display:none; }
#footer4 { display:none; }


Style sheet two



#footer1 { display:none; }
#footer2 { }
#footer3 { display:none; }
#footer4 { display:none; }

Excavator
11-27-2008, 12:43 AM
Hello unknownsoul,
It might be easier to use a php include. You could write the 4 different footers and put them in one dir, the in each page that you wanted to use a footer, you could load it with a line like this
<div id="footer">
<?php include("../footer_1.php"); ?>
</div>

It's pretty simple to set up, just google php include.

unknownsoul
11-27-2008, 01:12 AM
Hello unknownsoul,
It might be easier to use a php include. You could write the 4 different footers and put them in one dir, the in each page that you wanted to use a footer, you could load it with a line like this
<div id="footer">
<?php include("../footer_1.php"); ?>
</div>

It's pretty simple to set up, just google php include.

I know I'm already using that coding. I still have some problems with this method other then the fact of the css coding build up.

Better Demo

Style Sheet 1


#footer1 { visibility:visible; }
#footer2 { visibility:hidden; }


Style Sheet 2


#footer1 { visibility:hidden; }
#footer2 { visibility:visible; }


Content


<div id="footer1"><?php include("footer1.php"); ?></div>
<div id="footer2"><?php include("footer2.php"); ?></div>


If sheet one is selected then it will show footer1 and hide footer2, if sheet two selected it will hide footer1 and show footer2.

Which it all works fine, but on the basic page style sheet It shows both. Style sheet one is my basic sheet right now.

Excavator
11-27-2008, 01:18 AM
I was following you fine till this -
but on the basic page style sheet It shows both. Style sheet one is my basic sheet right now.

You lost me there...

unknownsoul
11-27-2008, 01:22 AM
Ah sorry, I've fixed my problem. I had an onclick thing I was testing which was calling the divs to show. Anyways thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum