How to place CSS popup in page

  • Author
  • #861921


    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 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 {
    opacity: 0.65;
    z-index: 9001;

    #popUpDiv {
    background:url(pop-back.jpg) no-repeat;
    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…


    “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:

    The blog I need help with is

    #862182 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 might include simply putting a notice in the sidebar.

    Or you could display a notice when someone hovers over an element or a particular type of element. To do it on a 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.



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




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

    Kindest Regards.

    Bajram Nebija
    [email address removed]



    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.

    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 Refer to >

The topic ‘How to place CSS popup in page’ is closed to new replies.