Need help? Check out our Support site, then


How to place CSS popup in page

  1. I started a website to host a selection of my short stories and essays but I'd like to include a small CSS popup that provides a terms of service agreement for accessing these pages. The wordpress.org site (of which I am not a part of and cannot migrate for another six weeks or so) has plenty of widget options, but I'd like to start updating my site with content and I feel a non-invasive CSS popup would be appropriate.

    This is the code I decided to go with:

    <body onload="popup('popUpDiv')">
    #blanket {
    background-color:#111;
    opacity: 0.65;
    *background:none;
    position:absolute;
    z-index: 9001;
    top:0px;
    left:0px;
    width:100%;
    }

    #popUpDiv {
    position:absolute;
    background:url(pop-back.jpg) no-repeat;
    width:400px;
    height:400px;
    border:5px solid #000;
    z-index: 9002;
    }

    <!--[if gte IE 5]> #blanket {filter:alpha(opacity=65);}<![endif]-->

    <div id="blanket" style="display:none;"></div>
    <div id="popUpDiv" style="display:none;">

    By clicking "Accept," you agree that...

    Accept
    Decline
    </div>

    "This is where the property goes"

    _______

    My extensive knowledge in web design and coding comes from a computer science 101 course in which I got a C. I know it's a mix of HTML and CSS, but is it possible to code that into the frontpage of my site or, even better, into the pages specific to my intellectual property?

    To see what this page looks like, visit: http://jakedskinner.com/temp/

    The blog I need help with is jakedskinner.com.

  2. WordPress.com doesn't offer the option to edit the theme code, and that includes the body tag which means you cannot add this part:

    <body onload="popup('popUpDiv')">

    Workarounds on WordPress.com might include simply putting a notice in the sidebar.
    http://en.support.wordpress.com/prevent-content-theft/

    Or you could display a notice when someone hovers over an element or a particular type of element. To do it on a WordPress.com site, you would need to add the HTML for the notice either to a text widget in the sidebar or somewhere inside the content of a post or page and then adjust the CSS accordingly.

  3. Thanks a lot for the help, DS. I'll try your suggestions

  4. Dears,

    please explain me in details how to place the advertisers code in my page.

    Kindest Regards.

    Bajram Nebija
    [email address removed]

  5. @bengima
    No blogger initiated advertising, retailing or reselling the work or products created or services provided by anyone other than yourself is allowed on free hosted wordpress.COM blogs like the one linked to your username here. E-commerce transactions via shopping carts and the like cannot be conducted on free blogs from and being free hosted by wordpress.COM. There is an advertising program called WordAds. It’s for well established blogs on their own domains, with suitable content and 20,000 - 25,000 page views or more monthly.
    http://support.wordpress.com/advertising/
    http://en.wordpress.com/apply-for-wordads/

    If you do require an ecommerce site, advertising and/or affiliate links you can hire a web host and get a free software install from http://wordpress.org Refer to > http://support.wordpress.com/com-vs-org/

Topic Closed

This topic has been closed to new replies.

About this Topic