Pop Up Window refresh parent

HTML, JavaScript No Comments »

If you have a script that opens up a new window using JavaScript: window.open()

on the child window, if you want to close the window and refresh the parent window, use the following code:

if (window.opener && !window.opener.closed) {

Fix ASP.net menu in Safari and Chrome

.Net, HTML No Comments »

If you use the standard ASP.NET menu (or toolbar) in your web application, it works well in most browsers except for Safari & Chrome. In these 2 browsers, each menu item appears on a new line.

The fix I found was placing the following code in my MaterPage code-behind:
if (Request.UserAgent.IndexOf(“AppleWebKit”) > 0)

If you are not using a Materpage:
protected void Page_PreInit(object sender, EventArgs e)
        if (Request.UserAgent != null && Request.UserAgent.IndexOf(“AppleWebKit”, StringComparer.CurrentCultureIgnoreCase) > -1)
            this.ClientTarget = “uplevel”;

The solution is adapted from this site (Thank you):

CSS float keep element inside DIV

HTML No Comments »

If you have come across the problem of containing floats, then there’s a simple fix to your problem. Typical scenario, you have an img tag (image) inside a div tag. The img is set to float (left of right), and the div tag is not big enough to contain all the img, so the img sticks out. The solution: hr tag at the bottom of the div tag, with the following CSS:

div.item hr { display: block; clear: left; margin: -0.66em 0; visibility: hidden; }

click here for more info

cell padding problem with older browsers

HTML No Comments »

I came across this problem with older browsers. If your table cell uses percentage for padding, for example:

<td style=”padding-right:1%”>text</td>

then that cell will expand off the screen.

Instead, use pixels for measurement, for example:

<td style=”padding-right:15px”>text</td>

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in