Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 914167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:40:34+00:00 2026-05-15T17:40:34+00:00

When setting a style at #inline2 hiding it, Fancybox will appear empty on click.

  • 0

When setting a style at #inline2 hiding it, Fancybox will appear empty on click. In addition the #inline2 element can be seen in Fancybox when there’s no style hiding it. Though this example is copy’ed directly from the various examples on the official Fancybox site. See Various Examples at http://fancybox.net/home.

Someone please enlighten me, and tell me what I’m doing wrong! I obviously only want the #inline2 element to be shown in Fancybox, and not as a regular part of my page.

Thanks in advance

/The guy having spend hours on what should be an easy job!

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html lang="da">
    <head>
 <meta http-equiv="content-type" content="text/html; charset=utf-8">
 <link type="text/css" href="/css/jquery.fancybox-1.3.1.css" rel="stylesheet" />
 <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
 <script type="text/javascript" src="/js/jquery.fancybox-1.3.1.js"></script>
 <script type="text/javascript">
 jQuery(document).ready(function() {
  $("#various2").fancybox({
   'modal' : true,
   'transitionIn' : 'fade',
   'transitionOut' : 'fade'
  });
 });
 </script>
    </head>
    <body>

    <a id="various2" href="#inline2">Inline - modal window</a>
    <div id="inline2" style="display:none;">
 <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</a></p>
    </div>

    </body>
    </html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:40:35+00:00Added an answer on May 15, 2026 at 5:40 pm

    When I look at this example, it becomes obvious that you have to point the href of the anchor element to a div within another one with style="display:none" (see #4), so you shouldn’t put the actual contents within a div with display:none, otherwise the contents will remain hidden (as you can see in Firebug).

    Change your code to

    <div style="display:none"><div id="inline2">
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. &nbsp;&nbsp;</p>
    </div></div>
    

    BTW, there are some errors within your page, like the closing tag </a> in #inline2, and some others. When your page is rendered using an XML parser, your users will only see a (probably yellow) error page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've tried setting the style of the UINavigationbar to be a translucent style in
I can't figure out why the select element has a larger height than input[type=text]
I'm setting a height of 20px on a <div> , though when it renders
What is the preferred method for setting CSS properties? Inline style properties: <div style=width:20px;height:20px;background-color:#ffcc00;></div>
I have a style assigned for a specific HTML element in my stylesheet file,
I can't set the font-size of a text input from the style sheet. However,
I have this div that's got a style attribute..In that I am setting it's
I am setting global styles in iOS 5 with UIAppearance . Here's an example:
I tried setting all possible styles to something other than grey, just to try
Setting up a project structure; I am thinking is it better to have somewhat

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.