1 replies
  • WEB DESIGN
  • |
I use the Thesis theme on my blog (WebsiteBegin | Learn to Build and Manage an Amazing Website), and I've added a feature box. As of now, it is the third element in the content section of the page (There are two posts above it, then the feature box says "Do You Want To Dominate Your Niche?").

I plan on, eventually, moving this box to the top of the posts, but I'd like to allow the visitors to close this box. Given the fact that I am using Thesis, I can easily edit the PHP and CSS of the box (I've already done so to create the bulk of it), but have no clue where to start with making a close button.

I know the basics of PHP, but I am not anywhere near good enough to tackle this aspect of it. Is it even possible with PHP? Do I need JQuery?

Any suggestions are appreciated!
#box #closeable #php
  • Profile picture of the author CoursesWeb
    Hi,
    To close /hide a html element, usually it is used javascript.
    Here is an example, a close button that hides the box in which is included:
    Code:
    <div style="background:#b8edb9; height:100px;">
    Some content<br/><br/><br/>
    <div style="cursor:pointer; width:45px; border:1px solid blue; background:#edeefe;" onclick="this.parentNode.style.display='none'">Close</div>
    </div>
    {{ DiscussionBoard.errors[6060677].message }}

Trending Topics