I'm using colorbox to display a separate but local document when a certain link is clicked. The problem and I've never done this before so it might be obvious, I can't get the page that pops up to be styled with CSS. I don't know how this works, will the page that pops up be styled with the CSS from the page that called it? I thought I couldn't or didn't need to have the popup document to have a header or body tags. I also would like to do this without using an iframe.
This is a selection from my html:
<li class="event priority1">
<a href="detail_img.html" class="cbox-popup">
<div class="content">Lorem Ipsum dolor sit amet, consectetur adipiscing elit.</div>
<div class="lower">
<hr>
<span class="date">03.13.2012</span>
<span class="type">Regulation</span>
<img src="img/icon-lg-financial.png" alt="" height="19" width="26" />
</div>
</a>
</li>
The document that it should load is:
<div class="popup wrap">
<div id="content">
<header>
<h1>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</h1>
<div class="info">
<time datetime="">05.10.2012</time>
<h2>Legislation</h2>
<img src="img/icon-popup-health.png" alt="" width="20" height="18" />
</div>
</header>
<div class="inner">
<img src="img/popup_img-fullSizeplaceholder.gif" alt="" width="765" height="491" />
</div>
</div>
</div>
And finally the javasript I'm using is:
<script>
jQuery(function() {
jQuery('.cbox-popup').colorbox({maxWidth: '75%'});
});
</script>
So if I don't have the header and body tags the document pops up but it's unstyled. If I have a complete document with html header and body tags nothing shows.