There are two different things here: the style of the iframe block and the style of the page embedded in the iframe. You can set the style of the iframe block the usual way:<iframe name='iframe1' id="iframe1" src="empty.htm" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
The style of the page embedded in the iframe must be either set by including it in the...
Recent Posts
Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts
HTML: Removing spaces between inline-block elements
Given this HTML:
<p>
<span> Foo </span>
<span> Bar </span>
</p>
and this CSS:
span {
display:inline-block;
width:100px;
}
as a result, there will be a 4px wide space between the SPAN elements. Demo: http://jsfiddle.net/dGHFV/
I understand why this happens, and I also know that I could get rid of that space by removing the white-space between the SPAN elements in the HTML...
CSS: How to align horizontally one div inside another div
How do I horizontally center a div in a div with CSS (if it's possible at all)? The outer div has 100%:
<div id="outer" style="width:100%">
<div id="inner">Foo foo</div>
</div>
In this example the outter div have 100% width, to align horizontally the inner div we can apply this code in the inner div:
#inner {
width: 50%;
margin: 0 auto;
}
Of course, you don't have to set the width to 50%....
HTML Best Practices: HREF attribute for JavaScript link # or javascript:void(0)
<a href="#" onclick="myJsFunc();">Run JavaScript Code</a>
<a href="javascript:void(0)" onclick="myJsFunc();">Run JavaScript Code</a>
Neither is the correct way to build a JavaScript link.
If you can have an actual URL that makes sense use that as the HREF. The onclick won't fire if someone middle-clicks on your link to open a new tab or if they have JavaScript disabled.
If that is not possible, then you...
Convert a HTML and CSS document to PDF with PHP
To convert an HTML document with CSS stylesheets you have to take a look at PrinceXML.
It's definitely the best HTML/CSS to PDF converter out there, although it's not free (But hey, your programming is not free either, so if it saves you 10 hours of work, you're home free.)
Oh yeah, did I mention that this is the first (and probably only) HTML2PDF solution that does full ACID2!?
PrinceXML Samp...
Rename the content inside a tag and confirm with jQuery
This examples target one simple container and change his name and then make the confirmation:
For this you need to identify the relevant h2/textarea
You also should nest your handler binding because each time your try to edit, you add a new handler
HTML:
<div class="rename">
<h2 class="replaceble">Dell PC</h2>
<a href="#" class="replace">Rename</a>
<a href="#" class="confirm">Confirm</a>
</div>
<div...
Subscribe to:
Posts (Atom)