Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Div layers

  1. #1
    New Coder
    Join Date
    Feb 2007
    Posts
    92
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Div layers

    Hi

    I have a layer which contains a textbox and button. i have positioned them on top of an image on my page.

    It works perfectly for IE and Firefox however if i change the screen dimensions it is completely out of line. I have tried making the position relative and absolute but neither work

    Im hoping there is a way around this without detecting browser settings with Javascript.

    Any help would be much appreciated.

    Thanks

    Code:
    <div id="nav">
           	            
            <img src="images/navigation.png" alt="" align="top" />
           	    
            	<div id="search">
                  <form id="txtSearch" method="post" action=""><input name="textfield" type="text" id="textfield" value="" size="14"  />
                  <img src="images/search.png" align="texttop" >
                  </form>
              </div>
    
    </div>
    Code:
    #nav {
    	width: 715px;
    	height: 145px;
    	margin: 0px auto 0;
    }
    #search {
    	position:absolute;
    	left:770px;
    	top:115px;
    	z-index:2;
    	width: 255px;
    	height: 30px;
    }

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    i have positioned them on top of an image on my page.
    Can't you just apply it as a background image of #nav?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Feb 2007
    Posts
    92
    Thanks
    1
    Thanked 0 Times in 0 Posts
    would the image not cover it then?
    also would this actually ensure it does not move around on the page for different dimensions?

  • #4
    New Coder
    Join Date
    Feb 2007
    Posts
    92
    Thanks
    1
    Thanked 0 Times in 0 Posts
    also it is not an image it is a textbox therefore i could not even make it part of the navigation image

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    Could you post a link to your page?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #6
    New Coder
    Join Date
    Feb 2007
    Posts
    92
    Thanks
    1
    Thanked 0 Times in 0 Posts
    http://www.inafrenzy.com/Site/home.htm

    Thank you i really appreciate the help.

    Also is there anything you recommend i do about the background - as it is an image it will not dynamically stretch down or come up at the bottom to fit the content within the border
    i cant think of anything i can do


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •