Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Getting DIVs to align right when windo resizes
Old 06-07-2009, 12:10 PM Getting DIVs to align right when windo resizes
Junior Talker

Posts: 2
Trades: 0
Hi everyone, I'm working on a web site with layers. The background banner is a layer and the menu buttons are also layers. I would like to get the layers to stay "in sync" or a stationary on the banner when the browser window resizes so that people viewing it on different resolutions can see it fine. I DON'T want the "home" button to keep moving around all over the place. When you resize the browser window, you will see what I mean. I've been trying to get this to work for a few hours and I did a lot of research. I'd really appreciate the help.

The site is up on http://ennovationssolutions.com/indextry11.htm
c6z06 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-07-2009, 12:45 PM Re: Getting DIVs to align right when windo resizes
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
I'm working on a web site with layers.
There are no "layers"!!!! That is a hold-over from ancient Netscape days and I wish dreamweaver would STOP calling them that.

To do what you want, you MUST dump the absolute positioning, it's not necessary and it WILL cause you headaches. Another nasty DW habit, making EVERYTHING position:absolute. Learn to use the normal document flow and floats and you'll be much better off.

Let me make this suggestion - no absolute positioning needed; no javascript for a menu rollover, and no images for navigation. The css really should go into an external file though.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>

<meta http-equiv="Content-Language" content="en-us">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>LP Photography</title>
    
<style type="text/css">
body{
    background: #666;
    font: 100.01% Verdana, Helvetica, Arial, sans-serif;
}

#wrapper{
    width: 77.5%;
    position: relative;
    margin: 0 auto;
}

#header{
    background: url(indextry11_files/pageBanner3n.gif) no-repeat;
    height: 200px;
    margin-top: 34px;
    border: 1px solid blue;
    }

    
#nav{
    width: 65px;
    height: 29px;
    margin: 75px 0 0 20px;
    color: #c1c1c1;
}

ul#menu{
    margin: 0;
    padding: 0;
    height: 29px;
    
}

#menu li{
    list-style: none;    
}

#menu li a{
    color: #c1c1c1;
    text-decoration: none;
    font-weight: bold;
}

#menu li a:hover{
    color: #fff;
}


img{
    border: none;
}

</style>

</head>

<body>
<div id="wrapper">


<div id="header">
    <div id="nav">
        <ul id="menu">
        <li> <a href="indextry11.htm">home</a></li>
    
        </ul>
    </div><!-- end nav -->
</div> <!-- end header -->
    
    <div id="content">
    
    
    </div> <!-- end content section -->
    
</div> <!-- end wrapper -->
    
</body>

</html>
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-07-2009, 01:27 PM Re: Getting DIVs to align right when windo resizes
Junior Talker

Posts: 2
Trades: 0
Thank you for the reply.

The code you provided does keep the content aligned. How can I use the banner background in there though?
c6z06 is offline
Reply With Quote
View Public Profile
 
Old 06-08-2009, 02:03 PM Re: Getting DIVs to align right when windo resizes
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
What banner background ? It's already in the code I gave you.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Getting DIVs to align right when windo resizes
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.51862 seconds with 12 queries