http://i50.tinypic.com/2qs70k5.jpg
In the photo above, I'm trying to push the search bar down to meet the border of the center box. I want it sitting right on the top of it....I just can't find what css settings accomplishes this.
[web] how do I move divs?
Quote:Original post by Fl4sh
I just can't find what css settings accomplishes this.
C'mon:
* google: css set position
-> 1st result
After your other question, my serious advice is that you get used to using search engines. On average, for questions like this, it will cost you less time than starting forum threads.
The easiest way to shuffle divs around is to give them absolute positioning, and twiddle with the top/left properties.
If you don't understand why the absolute positioning, or things like box model, I strongly urge you to brush up on understanding divs.
var oDiv = document.getElementById("theDiv");// Position absoluteoDiv.style.position = "absolute";// Make sure it has dimensionsoDiv.style.width = "100px";oDiv.style.height = "100px";// Top left corner of the screenoDiv.style.left = "0px";oDiv.style.top = "0px";
If you don't understand why the absolute positioning, or things like box model, I strongly urge you to brush up on understanding divs.
Quote:Original post by stormwarestudios
The easiest way to shuffle divs around is to give them absolute positioning, and twiddle with the top/left properties.var oDiv = document.getElementById("theDiv");// Position absoluteoDiv.style.position = "absolute";// Make sure it has dimensionsoDiv.style.width = "100px";oDiv.style.height = "100px";// Top left corner of the screenoDiv.style.left = "0px";oDiv.style.top = "0px";
If you don't understand why the absolute positioning, or things like box model, I strongly urge you to brush up on understanding divs.
I think the OP was asking about CSS, not ECMAScript ;)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement