How do I lock a layer in place?

I am trying to get a top layer to stay in position above the layer below it. When I resize the window in the browser it floats all around. How do I get it to stay in the same place relative to the rest of the design? Here it is:
http://www.martyrobertsproductions.com/scf/index.html
Thank you for any help - this is driving me crazy!

Here's the deal. This is in HTML-speak, not GoLive-speak. It's good to
understand the non-filtered meaning of these things.
"Layer" is just a nick-name for an absolutely positioned container that
happens to be a
tag. In fact, anything on your page *can* be
absolutely positioned - it doesn't have to be a
tag, and it doesn't
even have to be a container (for example, an image or even a horizontal
rule -
- can be absolutely positioned).
When something is absolutely positioned, several things happen to it:
1. It is removed from the normal flow. This means that the page suddenly
forgets that the absolutely positioned element is even there, and is
rendered as if that element were not even in the code. This prevents an
absolutely positioned element from interacting with anything else on the
page, meaning that it cannot push something else out of the way.
2. Then, after all that happens, the absolutely positioned element is
located on the page based on its top/right/bottom/left coordinate values.
You would think that if the left coordinate for an absolutely positioned
element were 100px, that this would refer to the left margin of the page and
in some cases it does, but not in all cases. The reality of positioning is
much more complex than this. The offsets given to an absolutely positioned
element are calculated from the location of that element's nearest
positioned ancestor. You can see what I mean by following this.
Create a blank page. On it, place two layers. Make them both 100px tall
and wide, and 100px left. Make one 100px top, and the other 200px top.
You will now see two boxes on the page one immediately above the other. Now
grab the bottom layer, and drag and drop it WITHIN the top layer (you will
have to do this in the code). Where do you now see the second layer?
It's now 200px below the top margin and 100px to the right of the left
margin of the PARENT LAYER (if you did things correctly). But the CSS that
locates this second layer has not changed. It's still 100px left, and 200px
top. What has changed for this second layer is its zero coordinate
reference point. It's now being placed in the rendered page based on the
location of its closest (in the code) positioned ancestor (the first layer).
That's the concept. So how come, when there is NO closest positioned
ancestor, the top/right/bottom/left locations are calculated from the
browser's margins? That's the way it works - when there is no positioned
ancestor, the  tag becomes the zero reference, i.e., the upper,
left-hand corner of the browser viewport.
You are half way there. The next concept we need to explore is another kind
of positioning - relative positioning. In a curiously redundant way, a
relatively positioned element has these properties -
1. It is NOT removed from the normal flow. In other words, the page
doesn't forget about it, and it can push other things around, or be pushed
around by other things.
2. It can be offset (using those same top/right/bottom/left values) from
its base location.
3. BUT when offset, the page still thinks it's where it started, not where
it winds up.
Now these last two things sound pretty goofy, and they are. To understand
the centering thing, though, you don't need to worry about them. The
important thing is that a relatively positioned element is not removed from
the normal flow.
The final concept you need is much simpler. Any block tag can be centered
within its container by giving it an explicit width, and then setting
left/right margins to 'auto'. Thus -
1. The browser know the element's width.
2. The browser knows the width of the element's container (whether it be
the whole page, or a table cell).
3. With auto left/right margins, the browser subtracts the element's width
from the container's width, and places half of the remainder on the left and
the right. Bada bing - it's centered.
Now for the big finish.
Since a relatively positioned element is not removed from the flow, it can
be centered. Since it's relatively positioned, any internal absolutely
positioned elements will use its location on the screen as a zero point
reference. Thus as this 'nearest positioned ancestor' to those interior
absolutely positioned elements moves to its center point, the absolutely
positioned elements are dragged along for the ride.
Get it?
Murray

Similar Messages

  • How do I lock a folder in place on the desktop

    On my desktop I have 1 folder that contain completed projects as well as multiple folders to manage current projects I'm working on. Occassionally I also have files on the desktop that I am working on for the day. Whenever I arrange by name (or any other criteria) the files and folders on my desktop move all around. My completed folder is now mixed in with files I'm working on and my current projects folders are all over the placed depending on what I named them.
    I would like a way to pin certain folders to their place on the desktop (similar to how the hard drive icon is pinned), so when I arrange the desktop files by a certain criteria these "pinned" folders would not move.
    **PLEASE KEEP YOUR DESKTOP EFFICIENCY TIPS TO YOURSELF. THAT IS NOT THE QUESTION I'M ASKING HERE.**

    landon-bbcom wrote:
    I would like a way to pin certain folders to their place on the desktop (similar to how the hard drive icon is pinned), so when I arrange the desktop files by a certain criteria these "pinned" folders would not move.
    Take a look at Desktop Icon Manager (DIM).  There has been problems of one form or another with the desktop since the days of OS9.  DIM, also in one form or another, has been around since then to try to address these problems.

  • How do I lock an image in place?

    I'm building a webpage in iWeb and I want one image to always appear at the top left of the page, flush against the edge. How do I do this?

    An IMG is wrapped in some DIVs.
    Find the image and change the style that's already there. Here's a sample style:
    <div style="position: relative; width: 144px; ">
    <img src="Voorbladfiles/shapeimage1.jpg" alt=""
    style="height: 108px; left: 0px; position: absolute; top: 0px; width: 144px; ">
    </div>
    In the style of the image, not the div, change position to fixed. Thus:
    <div style="position: relative; width: 144px; ">
    <img src="Voorbladfiles/shapeimage1.jpg" alt=""
    style="height: 108px; left: 0px; position: fixed; top: 0px; width: 144px; ">
    </div>
    I did not check it extensively but it should work as described.
    Message was edited by: Wyodor

  • How can I lock a clip to storyline, timeline or song in Final Cut Pro?

    My friends and I made our own version of Pharrell Williams happy video and I'm trying to edit it. The thing is that there are places where we sing and we want the song to match our lips so how can I lock the clip in place? I'm very new to editing and FCP so please write detailed directions.
    Thanks =)
    Here is an example of the video:
    https://www.youtube.com/watch?v=kxu3w5U6fSI

    Melodrama731 wrote:
    ...  Pharrell Williams happy video and I'm trying to edit it. The thing is that there are places where we sing and we want the song to match our lips so how can I lock the clip in place?..
    when it comes to 're-edit' things.. such as:
    2014 FIFA World Cup on ESPN Commercial: I Believe
    which 'inspired' me to do that:
    http://youtu.be/du4xWTtYKVY
    (the kids are my son's team)
    I drag the original into the storyline
    I set Markers (keyboard: m) to the original edit-points
    I have the pre-selections of my material in the Events browser, set edit-mode to 'video only'/shift-2
    set playhead to marker (magnetic is a good help), hit q
    'fine tune' the edit (edit/colors/effects/...)
    select clip and cmd-shift-arrow-down to apply final edit to the storyline
    jump to next marker (ctrl-' )
    That is a very fast way to 'dub' professional edits; and: I'm learning a lot, e.g. it is not only the edit-points, but the 'content'  which makes a good edit 'flow' (which lacks my version) ...

  • HT4085 How do I lock my ipad screen so the swipe action and side button on screen don't work? My cats do these things and the game disappears.

    How do I lock my ipad screen so the swipe action and the side button on the screen do not work?  When my cats play a game on my ipad, they regularly swipe the screen and push the side button and the game disappears.

    The button on the top that you use to lock and unlock or put to sleep is the power button.  The button lower center of the screen is the home button...can be used to also wake from sleep and switch to the base home screen.
    Good to hear you are now able to lock rotation, even if you are not sure how you did it
    If you go to the iBook icon, tap Store in the uppper left side of the screen, you can search for the iPad User Guide...a free download that will place the guide in your iBooks library as a great source of background information.

  • How can I convert a layer into a smart object with Adobe Photoshop Elements 10?

    How can I convert a layer into a smart object with Adobe Photoshop Elements 10?

    That feature is only in PS. Elements as you buy it has only limited support for smart objects. If you use File>Place to add something to your image it will come in as a smart object (within the limits to which PSE understands smart layers). However, if you know someone who can write an action for you in PS you can install it in PSE, or you could look into something like elements+ from simplephotoshop.com.

  • How do you lock a wav file to a video file in imovie?

    I am importing separate wav and video files.  How do I lock the audio file to the video file after I sync them so that when I cut any video the audio stays in sync?  Or is there a way to embed the new audio into the video footage?

    You can do that in Final Cut Pro X, but not in iMovie.
    A good workaround in iMovie is to line up the WAV file with your video clip. Then use SHARE/EXPORT USING QUICKTIME/Movie to QuickTime Movie/Options/Video Options/Compression/Apple Intermediate Codec. Save this file to a place you can find it. Then import it back into iMovie using FILE/IMPORT MOVIE...

  • All my saved layers disappeared. Shows only one locked black layer.with red sripes

    All my saved layers disappeared. Shows only one locked black layer.with red sripes

    Apple changed the save behaviour several times in the past few versions of MacOsX - there is a good article about this:
    http://www.macobserver.com/tmo/article/os-x-mountain-lion-how-apple-rescued-save-as
    The trouble is, you should (I know, not much of a help to you at this point) always create backups AND work with versions. So save many versions (x1, x1a, x2, x2a, etc), because when you work within one master file you run the risk of these type of accidents and there is always a tiny change your file becomes corrupt for some external reason. You never know. Disk space is cheap, losing your work is often a real hassle, and can become very problematic when dealing with clients.
    So, save many versions, and make backups of your work. And never NEVER open your original files in any other software - always use a duplicate. You never know what that software might do to your files.
    Anyway, have you tried searching for the file name on your mac? Maybe, just maybe there is a duplicate lying around somewhere with the layers intact.

  • How to open locked passcode?

    how to open locked passcode?

    If you forgot your screen-lock passcode or the iPod says disabled, connect the iPod to its syncing computer and restore via iTunes. If iTunes asks for the passcode and you can't enter the passcode or you do not have the syncing computer, place the iPod in recovery mode and then restore. For recoverymode:
    iPhone and iPod touch: Unable to update or restore

  • HT1222 i have iphone 4 how do open line this?my place is philippines

    i have iphone 4 how do open line this?my place is philippines

    If you are asking how do you get your iPhone to work with
    a local wireless carrier in the Phillipines, you will have to contact
    the wireless carrier the iPhone is currently locked to and ask if
    they offer unlocking and if you qualify.
    What does it say when you look at Settings=>General=>Carrier?
    If that is not what you are asking, please give more details so
    someone can offer a solution.

  • How do i transform a layer with maintain aspect ratio through scripting in Photoshop?

    Hi,
         How do i transform a layer with maintain aspect ratio through scripting in Photoshop? I am expecting your reply.
    thanks,
    Rajiv.s

    I don't think your talking apples to apples.  First I do not know of any Maintain Aspect Ratio icon in Photoshop. The only icon I think associated with transform is the anchor point icon in the option bar for transform. I think you may referring to the constrain check box in the image size dialog which you can check when resample is checked. Image size effect all layers in the document and the documents canvas size. The document canvas size will be changed to the values in the images size dialog and all layers will be transformed by percentage the canvas was changes while maintaining the layers position over the canvas and the layers I think may be cropped so only pixels over the canvas remain.
    I do not know if you know that layers can be any size and have aspect ratios different then the documents canvas.
    In your case it sounds like your describing a template that has a canvas size that is 2000px wide be 3000px high a 2:3 portrait aspect ratio.  Your image file has a landscape aspect. If you place that image into your template place would by default transform the image so the image would fit within the 2000px by 3000px canvas size there would be a white border top and bottom.  You could transform that smart object layer to it actual pixels size activeDocument.activeLayer.resize(100,100, AnchorPosition.MIDDLECENTER); then calculate the size you want to transform its height to. By retrieving the canvas size and the layers boundaries. Divide the canvas height pixel size by the layers pixel height size should give you the percentage you need to use. Make sure you set the ruler units to pixels so your working with pixel values for the canvas and layer size values. The resulting layer will be larger then canvas size keeping the anchor point centered will result in the canvas size masking off both sides.  In effect cropping you landscape to a portrait.  Note cropping a image from one orientation to the other changes the composition drastically.
    If your trying to make a composit like collage you may want to look at my Photoshop Collage Toolkit it will fit images to fill a 2000px by 3000px area http://www.mouseprints.net/old/dpr/PhotoCollageToolkit.html
    You could also do centered 2:3 crop that is resized to a 3000px

  • How do I lock a single cell or row or column

    how do I lock a single cell or row or column

    Can't. Only the whole table can be locked.
    A semi-workaround is to place a clear textbox over the cell and lock the textbox.  The user can't click on the cell but they can still navigate to it using the keyboard. They can also move the table around to get to the cell.  So it is not a great workaround but I thought I'd mention it anyway.

  • How I can lock  undesired incoming SMS on iPhone 5 ?

    How I can lock  undesired incoming SMS on iPhone 5?

    Unfortunately, they're evading their responsibility and blowing smoke. No iPhone (and darn few phones per se) has ever offered and supported call blocking. That is inevitably the domain of who's forwarding the call: the carrier. The near-monopoly status that some have in some places does NOT help in prodding them to fulfull their duties.
    So, in summary, it would appear you are
    <Edited By Host>

  • How do I lock v11.0 Mac preferences

    How do I lock proxy settings in v11.0 running Mac OS 10.7.3

    You need to create a mozilla.cfg file in the Firefox installation folder, just like is done on Windows.
    Place a file local-settings.js in the defaults/pref folder where you also find the file channel-prefs.js to specify using mozilla.cfg.
    pref("general.config.filename", "mozilla.cfg");
    pref("general.config.obscure_value", 0); // use this to disable the byte-shift
    You can use these functions in mozilla.cfg:
    defaultPref(); // set new default value
    pref(); // set pref, but allow changes in current session
    lockPref(); // lock pref, disallow changes
    See also:
    *http://kb.mozillazine.org/network.proxy.type
    *http://kb.mozillazine.org/network.proxy.%28protocol%29
    *http://kb.mozillazine.org/network.proxy.%28protocol%29_port

  • How do you lock the screen on iphone 4?

    How do you lock the screen on iphone 4 while on a call? I mute calls, activate face time and I have even called someone by accident during a call. I know there has to be a way to fix this. Please HELP!

    It locks automatically when you hold it to your head.
    If it fails to do this, then remove the case and see if it solves it.
    If it does not, then do the basics - restart, reset, restore.
    If that does not solve it, then make an appointment at the genius bar.

Maybe you are looking for