•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 422,832 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,304 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 5216 | Replies: 3
![]() |
•
•
Join Date: Aug 2006
Location: braintree
Posts: 57
Reputation:
Rep Power: 3
Solved Threads: 0
I have produced the following code so that all div tags mmove with the browser[HTML]<style type="text/css">
<!--
#Layer1 {
width:800px;
height:800px;
margin:auto auto;
overflow: hidden;
}
#Layer2 {
position:relative;
width:501px;
height:115px;
z-index:1;
left:280px;
bottom:780px;
background-color: #FFFFFF;
}
#Layer3 {
position:relative;
width:250px;
height:115px;
z-index:2;
left:20px;
bottom:895px;
background-color:#FFFFFF;
}
#Layer4 {
position:relative;
width:250px;
height:625px;
z-index:3;
left: 20px;
bottom: 880px;
background-color:#FFFFFF;
text-align:left;
}
#Layer5 {
position:relative;
width:501px;
height:625px;
z-index:4;
left: 280px;
bottom: 1505px;
background-color:#FFFFFF;
}
-->
</style>[/HTML]
I'm finding that when i insert text in the child div tags that the whole child div tag moves down the screen for some reason in mozzilla firefox. can anyone help me with this?
<!--
#Layer1 {
width:800px;
height:800px;
margin:auto auto;
overflow: hidden;
}
#Layer2 {
position:relative;
width:501px;
height:115px;
z-index:1;
left:280px;
bottom:780px;
background-color: #FFFFFF;
}
#Layer3 {
position:relative;
width:250px;
height:115px;
z-index:2;
left:20px;
bottom:895px;
background-color:#FFFFFF;
}
#Layer4 {
position:relative;
width:250px;
height:625px;
z-index:3;
left: 20px;
bottom: 880px;
background-color:#FFFFFF;
text-align:left;
}
#Layer5 {
position:relative;
width:501px;
height:625px;
z-index:4;
left: 280px;
bottom: 1505px;
background-color:#FFFFFF;
}
-->
</style>[/HTML]
I'm finding that when i insert text in the child div tags that the whole child div tag moves down the screen for some reason in mozzilla firefox. can anyone help me with this?
It's likely related to "relative" positioning. The position of the element is relative to the content of the parent element. I explain positioning in this article.
Can you post your HTML, as well?
Can you post your HTML, as well?
•
•
Join Date: Aug 2006
Location: braintree
Posts: 57
Reputation:
Rep Power: 3
Solved Threads: 0
Maybey i should just give up on the whole margins being center on the browser.
If there was just one browser it would be fine.
If i have no margin:auto auto i think i will be alright with text. I will show you my website once its finished to show you what i have been trying to do.
The problem with css is that if somone changes something in the view panel like text size it can mess a whole page up and the text might run over something else.
If there was just one browser it would be fine.
If i have no margin:auto auto i think i will be alright with text. I will show you my website once its finished to show you what i have been trying to do.
The problem with css is that if somone changes something in the view panel like text size it can mess a whole page up and the text might run over something else.
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ads adsense beta bon browser browsers browsing code css development div dreamweaver echo email encryption europe firefox gecko google google checkout google checkout vat html html api internet internet explorer internet explorer 7 javascript leak link linux memory microsoft mozilla news open source revenue security software super symantec tables testing text thunderbird unit users web webmail wysiwyg
- How to correct this javascript UNDER Mozilla Firefox? (JavaScript / DHTML / AJAX)
- Bookmark function in mozilla firefox (HTML and CSS)
- Firefox problem - can't install update and Thunderbird -"fights" with Netscape! (Windows NT / 2000 / XP / 2003)
- Internet explorer stopped working after using mozilla firefox (Windows NT / 2000 / XP / 2003)
- mozilla firefox 0.8 (Windows NT / 2000 / XP / 2003)
Other Threads in the HTML and CSS Forum
- Previous Thread: DIV help
- Next Thread: index.html AND home.html WHY?



Linear Mode