Hide content

monky91

New Member
Messages
706
Reaction score
0
Points
0
I have a site and the index.php is full of words, but now I just want it to show : Site under construction....

How to hide the other contents? Using what html code?

Actually, it is not a must to use html code, if you know how to let those members view "under construction " word and hide the other content using javascript or php, it can do too.

Thanks
 
Last edited:

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
you could just wrap your other text in <?php and ?>, that's probably the simplest thing to do, just put those tags around all the text that you don't want to be viewed
 

dyfuse

Member
Messages
395
Reaction score
0
Points
16
Or possibly put a <div></div> around the text with the CSS property "display"

Code:
<div [B]style="display: none;"[/B]>
Your whole bunch of plenty of text.
</div>

Don't worry, this will work in a HTML-based page.

Hope this helps! :)
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
i guess that would work too then...lol sorry i ain't familiar with CSS :(
 

dyfuse

Member
Messages
395
Reaction score
0
Points
16
Yeah, that's no problem...CSS is very easy to pick up...you'll have in under wraps in no-time!!

It's just if you wrap the chunk of text in "<?php" and "?>" tags, you will get errors, especially if it's a PHP-format page, if it's a HTML-format page...I believe it'll most likely print out all the text regardless, because it won't recognise the PHP opening/closing tags.
 

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
OYu could always use the trusty HTML comment tags

<!-- -->
 

dyfuse

Member
Messages
395
Reaction score
0
Points
16
It's funny how one sometimes forgets the basics...;)

"How to hide contents within a HTML page"
In summary:

CSS
Code:
<div [B]style="display: none;"[/B]>
Your whole bunch of plenty of text.
</div>

HTML
Code:
[B]<!--[/B] Your whole bunch of plenty of text. [B]-->[/B]


If the page was in PHP format:
Code:
[B]/*[/B] Your whole bunch of plenty of text.
(Multiple Lines) [B]*/[/B]
or
Code:
[B]//[/B] Your whole bunch of plenty of text. (Single Line)

Hope this all helps!
 
Top