473,657 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

appendChild() and CSS position attributes

What does a child element inherit as far as position, top, left, etc.
?
I'm using DHTML to create child, and append with appendChild()

I actually used "position:absol ute" with a parent element.
What should I set to ensure that a child element's position would be
"relative" to the parent.

Is nesting <div> elements legal ?
Are there other ways to implement a container ?
TIA for you input.

May 23 '06 #1
4 2518
i_****@hotmail. com wrote:
I actually used "position:absol ute" with a parent element.
What should I set to ensure that a child element's position would be
"relative" to the parent.
position:absolu te isn't inherited. But the relationship between the
parent, floated element, and it's children remains relative.
Is nesting <div> elements legal ?
Yes of course

http://www.w3.org/TR/html4/struct/global.html#edef-DIV
Are there other ways to implement a container ?


Any element with another element inside it could be considered a
container. I don't think that's what you're asking though. The answer
is; yes, loads.

--
Brian O'Connor (ironcorona)
May 24 '06 #2
ironcorona wrote:
i_****@hotmail. com wrote:
I actually used "position:absol ute" with a parent element.
What should I set to ensure that a child element's position would be
"relative" to the parent.


position:absolu te isn't inherited. But the relationship between the
parent, floated element, and it's children remains relative.


Sorry. It is inherited
http://www.w3.org/TR/CSS21/visuren.html#choose-position
--
Brian O'Connor (ironcorona)
May 24 '06 #3
ironcorona wrote:
position:absolu te isn't inherited. But the relationship between the
parent, floated element, and it's children remains relative.


Sorry. It is inherited
http://www.w3.org/TR/CSS21/visuren.html#choose-position
--
Brian O'Connor (ironcorona)
May 24 '06 #4
ironcorona wrote:
ironcorona wrote:
position:absolu te isn't inherited. But the relationship between the
parent, floated element, and it's children remains relative.


Sorry. It is inherited
http://www.w3.org/TR/CSS21/visuren.html#choose-position


Inherited: no

I think this means it is not inherited, doesn't it?
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
May 24 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
5171
by: kie | last post by:
hello, i have a table that creates and deletes rows dynamically using createElement, appendChild, removeChild. when i have added the required amount of rows and input my data, i would like to calculate the totals in each row. when i try however, i receive the error: "Error: 'elements' is null or not an object"
2
5483
by: kie | last post by:
hi, when i use appendChild, the following code ends in success cellSec3=document.createElement('TD'); aTextBox=document.createElement('input'); aTextBox.type = 'text'; aTextBox.value = nz(s_unit_price); aTextBox.size = '15';
1
2779
by: Nicolas Van Lancker | last post by:
Hi folks; I have this webpage, allowing users to insert multiple records in one post into the database. Because I don't know the exact number of records they want to add, I created a little javascript that adds a new line with HTML inputboxes and lists to the form if they press a button.
2
8498
by: Michael Lee | last post by:
Does anyone know why the following function works in FireFox but not in IE6? function ShowTable() { clonedNode = document.getElementById("myTable").cloneNode(true); win = window.open(); win.document.body.appendChild(clonedNode); } I am trying to display a table with id="myTable" in a new window. IE6
1
1731
by: Shawn Modersohn | last post by:
Firstly, thanks for all the help in here. My code is: <script type="text/javascript"> var img1= new Image(200,200) img1.src="file://d:/datatools/c++/boat1.jpg" var img2 = new Image(200,200) img2.src="file://d:/datatools/c++/china1.jpg"
1
4953
by: Ryan Stewart | last post by:
If you don't want to read this post because of its length, I understand. I've spent two and a half days on this problem and have a good deal of information to relate. And this is kind of a long shot, but I'm just hoping someone here has experienced a similar problem and has a better idea of what's going on than I do. First, I've tested this in IE 6.0, Netscape 7.2, Mozilla 1.75, and Firefox 1.0. It works fine in IE (even though I was...
7
8262
by: Andrew Poulos | last post by:
If I try to append a PARAM tag twice I'm having problems: var.medDiv = document.getElementById("myDiv"); var medObj = document.createElement("object"); var p = document.createElement("param"); p.setAttribute("FileName",this.URL); medObj.appendChild(p);
1
12698
by: xaces | last post by:
I am relatively new to javascript. I am trying to create a menu. I cant get it to show on IE. The object exists but just wouldnt show up. Can anyone please help?? Thanks :confused: var menuDivNode = document.createElement("DIV"); menuDivNode.id = "thisMenu"; menuDivNode.align = "center";
2
3780
by: Rick | last post by:
I'm using an xpathnavigator in a windows form to append child with attributes. xnav.AppendChild("<item name="""" value=""" & client supplied value & """/>") When the client enters a value with illegal characters like "<", the naviagtor does not escape them. How do I escape the input in a Windows form?
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.