Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is there a way to make text invisible?

    Is there a way to make text invisible? The reason I ask is because I want to make it easier to edit my site on notepad. I know how to do it with html (making the text the same color as the background), but I was wondering if there was an alternate way of doing it, maybe with css?

  • #2
    Regular Coder Ranger56's Avatar
    Join Date
    Mar 2005
    Location
    Kent, WA.
    Posts
    783
    Thanks
    0
    Thanked 0 Times in 0 Posts
    font-size:0; would make it too small to see.

  • #3
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,877
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Is there a way to make text invisible?
    Just don't include any text and presto, it'll invisible. lol

    How would making your text "invisible" make it easier to edit in notepad?

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Css

    "display; none" will remove any element from the flow completely; "visibility: hidden;" will make an element invisible, but its place will still be left behind.

    Do note that this introduces usability and accessibility risks, and search engines may shoot you down if they regard it as an attempt to fool them.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #5
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Quote Originally Posted by Technique View Post
    Is there a way to make text invisible? The reason I ask is because I want to make it easier to edit my site on notepad.
    Your reason for wanting to do this makes no sense to me but you can make text "invisible" by setting the opacity to zero:

    opacity: 0; /* CSS 3 for Firefox and Opera */
    filter: alpha(opacity=0); /* proprietary Microsoft CSS for Internet Explorer */
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #6
    New Coder
    Join Date
    Sep 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    By making certain text invisible on notepad, I know where to edit certain parts of the html without it showing up on the actual site. Coding can get very crowded and confusing, but by puting "INSERT CONTENT HERE" etc., it'll make it easier to edit in the future.

  • #7
    Regular Coder
    Join Date
    Jun 2006
    Posts
    225
    Thanks
    6
    Thanked 3 Times in 3 Posts
    I'd suggest using comments for that..

    PHP Code:
    <!--This is a commentit will not be rendered by the browser--> 

  • #8
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by DownStrike View Post
    I'd suggest using comments for that..

    PHP Code:
    <!--This is a commentit will not be rendered by the browser--> 
    Yeah, that's what you are gonna want to do.
    OracleGuy

  • #9
    New Coder
    Join Date
    Sep 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok thanks man, thats exactly what I needed. One question though, will I need to close the tag off?
    Last edited by Technique; 09-08-2006 at 06:12 PM. Reason: Error

  • #10
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,700
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    That's no tag, that's an HTML comment. It is opened/started with the entity <!-- and closed/ended with this one: -->

  • #11
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Includes

    You could try using includes to make code maintenance easier:

    in .ASP your index page could look something like this:

    Code:
    <!-- #include virtual ="head.inc" -->
    <!-- end head.inc -->
    
    <!-- #include virtual ="nav.inc" -->
    <!-- end nav.inc -->
    
    <!-- #include virtual ="main-content.inc" -->
    <!-- end main-content.inc -->
    
    <!-- #include virtual ="sidebar.inc" -->
    <!-- end sidebar.inc -->
    
    <!-- #include virtual ="footer.inc" -->
    <!-- end footer.inc -->
    or with .PHP
    Code:
    <?php include("head.php"); ?>
    
    <?php include("nav.php"); ?>
    
    etc.
    This way you are only editing the the seperate include files.

    So instead of an 'insert content here' comment, you could just use an include call right in your html page, like so:

    Code:
    <?php include("main-content.php"); ?>
    Hope all that makes sense

    Actually, this is quite an interesting topic: a text editor that allows you to toggle the visibility of code blocks would be a great idea......I wonder if there is one?

    Other than that, I'd give a more advanced text editor, like notepad plus mentioned above, or, my favourite: SciTE which at least colour-code different types of code.

    Kind regards,

    Gary


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •