div

CSS: Best way to center a DIV on a page vertically and horizontally?

Best way to center a div on a page both vertically and horizontally? I know that: margin-left: auto; margin-right: auto; Will center on the horizon but what is the best way to do it vertically too? Thanks ...

Is it possible to embed an AS3 swf in a DIV layered above an embedded AS2 swf?

I think the question is pretty self explanatory. Anyone done this before? UPDATE: Clarification on why I need to do this. We have a single swf behemoth of an AS1 - AS2 site with a large video gallery section. The client wants to update the video section as the AS2 code cannot handle their more recent, much larger, video files. The clien...

Drawing a caret between a point and a draggable div

Hi all, I have a draggable div that represents a little info popup that the user can drag around the screen. But this div is anchored to a point on the screen, and I would like there to be a caret drawn between the div and the point that it is anchored to. An example of this can be found on Google maps, when you hover over a store or ...

Is it possible to change an HTML element property using its ID with PHP?

Hi guys! I want to do something like this: page A has a link to page B page B gets content from a database and processes it the result from page B is displayed on a div in page A please notice that I don't want to leave page A while page B processes the information of the database. what I'm really trying to do is avoid using fra...

Can't make div look the same in IE6 and IE7/FF

Hi, hope you can help me with this one. I have a Div with five float divs inside: var div=document.createElement("div"); div.className="cssDivNino"; var divFolio=document.createElement("div"); divFolio.className="cssFolio"; div.appendChild(divFolio); var divCurp=document.createElement("div"); divCurp.className="cssCurp"; div.appendCh...

How can I position a div over two iframes where one iframe has external (different domain) content?

I am looking for a way to position a div (it would be a pop-up that would be activated by a user hovering and/or clicking much like lightbox) over an a split iframe where the top iframe is content from my server and the bottom iframe is content from another server. Like this: ---------------------------------------- | ...

Make <div> resizeable

Hi! Is there a way to make a <div> container resizeable with drag'n'drop? So that the user can change the size of it using drag'n'drop? Any help would really be appreciated! ...

Onselect event doesn't fire on div

Hello, I have been unable to trigger an onselect event handler attached to a <div> element. Is it possible to force a <div> to emit select events? ...

Access Div Contents using Up and Down Arrow Keys using javascript

I have a Div Tag which contains 4 child Div Tags <Div id="Parent"> <div id="childOne">ChildOne div id="childOne">ChildTwo div id="childOne">ChildThree ...

Changing CSS style from ASP.NET code

I need to change the height of a div container(CSS Property Height) from ASP.NET code (VB). How can I do that? Thanks ...

Floated block-level element: is it necessary to set the width, if yes, how?

I've just come to think about this issue which really hasn't bothered me at all since everything works just fine. Anyway, what does the community think about the following: Say I have textboxes, dropdownlists and submit buttons. They are all inline-elements. Which means that "officially" margin, padding, width and height properties shou...

Why use tables to structure your layout?

looking at the soure code for stackoverflow, i noticed they have used tables and inline CSS quite a bit. also something i found odd was use of inline table attribute formatting. <table width="100%"> I'm just curious if there was any specific reason(s) to why they used tables to structure their template instead of the popular (or used ...

How do I make a "limited-fixed" div using HTML and JavaScript?

Given the existence of other divs on a page, how would one create a div that acts as if it's fixed-width within a certain domain of a web page? Example: the commenting system on Slashdot, which acts like a fixed-width div for purposes of scrolling along a screen but will remain within a certain length? I want a block of text to appear al...

Simple jQuery task failing: hide child elements of <div> tag

There has to be a simple explanation for this. I have a parent <div> tag containing a number of child divs that need to be hidden depending on their class. Problem is, I can't even seem to get a handle to my parent div. What on earth is the problem here? I'm going out of my gourd. The jQuery code (snippet) looks like this: $(functi...

Refresh a Div that has a Google ad inside it

Hello all, I have a div that holds a google ad. My website is mostly AJAX and there is no need for a browser refresh. That means my ads will not refresh either, which isnt ideal, a user staring at one ad all day. So I wanted a way to refresh a particular div on a page. I found many solutions but they didnt work. For example, using JQu...

load aspx in div or adjust the size of a iframe

Hello, I have a htm file with an iframe and a menu structure. The menu can load a htm file in the iframe or a aspx file. No problem at all. But... Now they want the iframe to get the size of its content. (so there will be no scrollbar in de iframe, but you have to scroll the whole htm file) I didn't get this to work so I thought I wou...

Javascript: Lazy Load Images In Horizontal Div?

I have a div that has a bunch of thumbnails showing horizontally (with a horizontal scrollbar). Is there a way to lazy load these thumbnails and only show them once the user horizontally scrolls to their position? All the examples I've seen check the browser window, not a div. This is for contest entries so sometimes there are hundreds ...

Showing and hiding a DIV partially

Hi, I need to hide a DIV partially, not totally. When page loads, I want it to show the first, let's say, 100 pixels sitting on the uppermost part of the div. When the user clicks a certain button, the div will open (it could be a sliding effect like jQuery's show()). When the user clicks back the same button, the div will return to its ...

Internet Explorer - Space Between Floated Divs

I've been running into a presentation issue with Internet Explorer. The following simple block of code renders as I would expect it to in Safari, FireFox, Chrome, and Opera. However it results in a noticeable space between the left and right floated DIV elements in both IE6 and IE7. My question is: Is there a more correct way to achie...

HTML / CSS - DIV Element hidden when it shouldn't be?

(clickable) Mainad has a valid height and width, however it isn't shown like subad1/subad2. Which are in essence exactly the same! (just a different background image). Firebug shows my div as greyed out for some weird reason. Replacing the contents of mainad with just some text doesn't solve the problem (problem isn't related to inner...