(CSS) Can this simple layout idea be better coded?

Hi guys,
I'm trying to build a very simple layout made slightly more complex via a background gradient that needs to be in sync with the foreground image.
http://vilverset.com/murray.php
As you can see, the layout is supposing a 1000px wide viewport, or bigger. The foreground image is 650px wide, and the text column next to it is 350px wide. This fills up our 1000px viewport.
Now, normally, I would just apply the image as a background to the text column's container (and make that container 1000px wide), except that there are a few conditions to this layout that make that solution ill-advised.
When there's enough content to fill it, the text column needs to stretch from the top to the bottom of the viewport, and trigger the main browser vertical scrollbar when exceeding this window.
When there isn't enough content to fill the length of the column, the content should be vertically centered.
The image on the left of the column should be vertically centered at all times, or it will lose its sync with the site's background gradient.
The image on the left of the column should never scroll with the content. It should be fixated.
The combination of the image and column should be centered in the viewport (both axis).
You've seen how I did it @ the link above. Div class "image" has the main image as a background, and this image is padded to extend to fill the whole 1000px width of the site layout. It's the only way I could think of to offset the image from the center spot. Ditto the text column, which is in a 350px wide div, that has a 650px left side margin (totalling 1000px).
The main negative side-effect of this method occurs when you reduce the viewport to less that 1000px in width. The image starts moving AWAY from the column (as you can see by trying it out at the link above).
If there's a better way to get that image and that column into position, and the combination of both centered on the screen in both axis... I'm willing to try it!

I'm glad you're pleased with your layout.     I'm having a few problems with it.
When viewed on a narrow screen such as an iPhone in landscape mode, your image moves leftwards out of view.  And when device is scrolled horizontally to see content, text collides with the image.  Is this what you want to have happen? (see screenshot)
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media  Specialists
http://alt-web.com/
http://twitter.com/altweb
mjyeager wrote:
You tell me these things can't be done, but I've got foreground JPGs with gradients perfectly in sync with the background gradient, and neither of them scrolls with the text content. So not only can it be done, I've done it. Right there, at that link I posted in the OP. And it works in all major browsers, including Safari on Mac.
I was just wondering if there was a BETTER way to do it. But if people are going to start telling me it simply can't be done, when the proof that it can is staring them in the face, then I guess I'll just count myself lucky that I achieved what I've achieved and stick with what I've got.

Similar Messages

  • Can this be tweaked in a better way??

    hi, ive picked up most things about OC. i built this pc and after a couple of months ive seen that the cpu is letting down my gpu HARD!!. so instead of forking out an extra 500bucks for 500 mhz i OC, i started this morning and i managed after numerous CMOS resets, i got my 3000+ (1.8ghz) cpu up to 2.3ghz equivilent to 4000+, im so happy.. i will list my rig below and what i have done in the bios. it seems pretty stable, ive played a couple games to test it out.. am i doing anything wrong that could harm the parts.. thanks, any better recommendations please.. I think my ram (216mhz +) is limiting my fsb, once i hit 260 its unstable at times, very weird...
    MSI k8n neo4 FI - 1.60V
    Amd 64 3000+ venice running at 2.3ghz (stock 1.8ghz) -FSB-255, (STOCK 200), Multiplier x8.5, cpu over vid 6.6%, HT x3, CPU VID 1.450V,
    2X512MB Corsair xms 3200cl2 DDR400- auto settings, MEM 2.85V --Dont undestand how to change mem settings like 2-3-4-5 format.. MEM is running at 216mhz
    XfX 7800GTX factory oc 490/1300
    74gb Raptor 10,000 rpm
    500wt Antec (ACM) - dont really know much about the voltage things.
    2X120mm fans and 90mm fan.
    3dmark 05 stock 7100
    3dmark 05 OC 7850

    What are your temperatures?   With the CPU voltage and Mem voltage High, you have to be worried about exceeding maximum temperatures for the components.  Do you have heat spreaders on the ram? or a aftermarket cooler on the CPU?
    I try to keep temperatures below 50c for the board and CPU, they can run hotter, but not always the best Idea. 
    Im not experienced with your CPU, but I dont think your memory is causing the instability at 260 FSB.  Your probably reaching the maximum overclock on your CPU.  Try droping the multiplier on the chip, the multiplier on the HT down to 3x, and setting the memory to a 1:1 divider and seeing how far your FSB will go.  If it stops at FSB 260 (Mem 216) then I would say yes you need to change memory timings or divider.  But my guess would be that you can get that memory up to 240 or so before you see problems in MemCheck.
    Refer back to the Overclocking guide for other tips. 

  • Can this plug-in opens jpeg better?

    This plug-in claims it can open jpeg file and render it better than photoshop:
    http://www.betterjpeg.com/jpeg-plug-in.htm (scroll to the end of the page)
    I'm surprised to see this claim. I always assume a jpeg file is rendered the same way by all apps.
    Is their claim true? If so, why wouldn't adobe implement this as well?

    Has a 30 day free trial. Download it, test it and let us know.

  • Power Mac G4 M5183-Can this computer be rebuilt with better hardware?

    I recently found my old Power Mac up in the attic, I was courious if I could rebuild the desktop or is the case of this G4 only compatable with its specific hardware. Will the G4 Quicksilver hardware work? Is it even worth trying to rebuild?

    With enough money and enough time you can rebuild and update anything. The question is: "Is it worth it?" which only you can answer.
    In my experience, the Quicksilver and Digital Audio can be reasonably contemporary and up-to-date performers. Be prepared, however to keep a back up (working) machine and a parts machine available if you intend to rely on these oldsters, and keep a watchful eye and a few spare dollars handy as well.
    Older than this - in my view - starts to come under the heading of 'hobby' and can easily become a money pit.
    You've been warned.... now go for it!
    Jon

  • Can this simple script be made quicker? Color labels

    All this does is turn all the selected items red, it works but it is not as qucik as selecting all the files right click and select color label.
    In the manual method you see all the files turn red at the same time, whereas below you see it happen 1 by one.
    tell application "Finder"
      activate
              set selected to selection
              repeat with n_file in every item in selected
                        set label index of n_file to 2
              end repeat
    end tell

    Hi,
    If you want a faster script, you can use this script (python shell) :
    -- none = 0, gray = 2, green = 4, purple = 6, blue = 8, yellow = 10, red = 12, orange = 14
    set tColor to 12 -- red
    tell application "Finder" to set sel to selection as alias list
    repeat with i in sel
          tell i to set contents to quoted form of POSIX path of it
    end repeat
    set oTID to text item delimiters
    set text item delimiters to " "
    set sel to sel as string -- arguments for the shell
    set text item delimiters to oTID
    do shell script "/usr/bin/env python -c 'from sys import argv; from xattr import xattr
    color = chr(int(argv[1]))
    nbr = len(argv)
    for i in range( 2, nbr ):
       try:
            attrs = xattr(argv[i])
            try:
                finder_attrs = attrs[u\"com.apple.FinderInfo\"]
            except:
                finder_attrs = 32*chr(0)
            finder_attrs = finder_attrs[:9] +  color + finder_attrs[10:]
            attrs.set(u\"com.apple.FinderInfo\", finder_attrs)
       except:
               print argv[i]'  " & tColor & " " & sel
    The shell return  the files path that have not been processed (error : permissions, locked, ...).
    Here is the bench on my old machine (156 selected files) :
    -     9.4 seconds,  script using  the Finder
    -      3.4 seconds,  script using  the Finder and (selection as alias list)
    -      0.24 second, my script.

  • Can this be done with css rollovers?

    Hi,
       I'm using Dreamweaver CS4 on a Windows PC. I understand the basics of css rollovers where you change the background image position up or down but the text used will still end up being a common font that will suit every pc. What I'd like to do is use an uncommon font in my navigation bar. I made an image in photoshop that had two versions of a word like home for example one on top of the other like you would for a css rollover but once I created a link I had the link color border around the image, so it didn't work. Here is a link to a website that is similar to what I'm trying to do http://www.inksmithtattoo.com/. Look at the navigation, can this be done using css rollovers? If not how do you think it was done? Is there a way to use uncommon fonts in a navigation bar? I even did some research on using Dreamweavers hotspot function but found that there were issues in using it for navigation. I'm getting pretty familar with Dreamweaver but I'm not that good at coding so if anyone does have any ideas please include some keywords that I can google and read more about what your trying to say, links to the info would be even better but I realize that if your as busy as I am you can't take that kind of time.
    Any ideas or help will be greatly appreciated.
    Thank you to all,  dluthier

    That site is using images only. It is not a text based link:
    here is the css they are using:
    #navAbout a {
    -moz-background-clip:border;
    -moz-background-inline-policy:continuous;
    -moz-background-origin:padding;
    background:transparent url(../_img/navAbout-Home.gif) no-repeat scroll 0 0;
    left:473px;
    top:318px;
    As you can see it is an image only. See the attachment with this post. Also since it is a background image it won't show up if you right click on the so seemed text
    Please install firebug or webdeveloper plugin if on Firefox and you will be able to inspect the elements and know what exactly they are.
    Hope it helps
    Regards,
    Vinay

  • Burner not working, 8.98 GB free, can this 2003/2004 imac model be cleaned for better use or will I continue to have problems?  Do I need to just buy a new one?

    burner not working, 8.98 GB free, can this 2003/2004 imac model be cleaned for better use or will I continue to have problems?  Do I need to just buy a new one?  I remember with a PC being able to defrag.

    You could buy an external dvd/cd drive.
    Suggest other world computing.
    You need to delete some files.  Many posters to these forums state that you need much more free space: 5 gig to 10 gig or 10 percent of you hd size.
    (0)
    Be careful when deleting files. A lot of people have trashed their system when deleting things. Place things in trash. Reboot & run your applications. Empty trash.
    Go after large files that you have created & know what they are.  Do not delete small files that are in a folder you do not know what the folder is for. Anything that is less than a megabyte is a small file these days.
    (1)
    Run
    OmniDiskSweeper
    "The simple, fast way to save disk space"
    OmniDiskSweeper is now free!
    http://www.omnigroup.com/applications/omnidisksweeper/download/
    This will give you a list of files and folders sorted by size. Go after things you know that are big.
    (2)
    This will save you a gig of space.
    Monolingual is a program for removing unnecessary language resources from Mac OS X,in order to reclaim several hundred megabytes of disk space. It requires at least Mac OS X 10.3.9 (Panther) and also works on Mac OS X 10.4 (Tiger). It worked for me on 10.4
    http://monolingual.sourceforge.net/
    A detailed write-up on how to use Monolingual:
    http://www.jklstudios.com/misc/monolingual.html
    (3)
    These pages have some hints on freeing up space:
    http://thexlab.com/faqs/freeingspace.html
    http://www.macmaps.com/diskfull.html
    (4)
    Buy an external firewire harddrive.
    (5)
    Buy a flash card.

  • Pls i need help for this simple problem. i appreciate if somebody would share thier ideas..

    pls i need help for this simple problem of my palm os zire 72. pls share your ideas with me.... i tried to connect my palm os zire72 in my  desktop computer using my usb cable but i can't see it in my computer.. my palm has no problem and it works well. the only problem is that, my  desktop computer can't find my palm when i tried to connect it using usb cable. is thier any certain driver or installer needed for it so that i can view my files in my palm using the computer. where i can download its driver? is there somebody can help me for this problem? just email me pls at [email protected] i really accept any suggestions for this problem. thanks for your help...

    If you are using Windows Vista go to All Programs/Palm and click on the folder and select Hot Sync Manager and then try to sync with the USB cable. If you are using the Windows XP go to Start/Programs/Palm/Hot Sync Manager and then try to sync. If you don’t have the palm folder at all on your PC you have to install it. Here is the link http://kb.palm.com/wps/portal/kb/common/article/33219_en.html that version 4.2.1 will be working for your device Zire 72.

  • The Bluetooth low energy protocol is not backward compatible with classic Bluetooth protocol. My iPhone 4s can not find my sonny in-dash player. However my iPhone 3GS does it. Very disappointed with this. Any idea how it can be fixed???

    The Bluetooth low energy protocol is not backward compatible with classic Bluetooth protocol.
    My iPhone 4s can not find my sonny in-dash player. However my iPhone 3GS does it. Very disappointed with this.
    Any idea how it can be fixed??????

    Hello,
    You are correct, Blue tooth low engergy, BTLE.(only) devices are not backward compatible with Classic bluetooth and cannot connect.
    However the Apple 4S and above have Bluetooth 4.0 support.. Hardware wise it has bothClassic Bluetooth, like the 3GS, as well as Bluetooth Low Energy.  There is no good reason why your 4s cannot communicate to your Sony in-dash player using the Classic bluetooth that resides in the 4S.
    I know that this does not answer the why it does not work, but it should work. Do you have to somehow re-pair the new phone up to the player?  Not  knowing the model of the Sony it is hard to investigate.
    And I hate to ask but are you sure that the Bluetooth radio is on in the phone?
    JT

  • Hi can someone keep this simple for me! my iPhone is due for a renewal. but my old laptop that it is backed up to no longer works! how do i go about saving all my songs pics etc to a new laptop without losing anything? please help!!!

    hi can someone keep this simple for me! my iPhone is due for a renewal. but my old laptop that it is backed up to no longer works! how do i go about saving all my songs pics etc to a new laptop without losing anything? please help!!!

                     Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • TS1424 I have downloaded a series of prison break but 3 episodes are saying "you do not have permission to access the requested resource" and "this episode can not be downloaded at this time" any idea how to fix this please??

    I have downloaded a series of prison break but 3 episodes are saying "you do not have permission to access the requested resource" and "this episode can not be downloaded at this time" any idea how to fix this please??

    I got this error with my iPad 3, my wife's iPhone 4, but not with my iPhone 4s.

  • I can't open adobe ideas files from ps touch via the cloud. How do I do this?

    I can't open adobe ideas files from ps touch via the cloud. How do I do this?

    Oh good lord.  I can't believe I spent so much time on this and it's right there under Google.  Thank you so much!  Happy Thanksgiving!
    Laura
    Check me out @ http://www.lauramacky.com/

  • I've just bought a new mac and I want to transfer the content from my old Macbook to my new. If I have iCloud enabled on both devices, is this simple, or is there a limit to what I can transfer? For example, can I upload word files to iCloud?

    I've just bought a new mac and I want to transfer the content from my old Macbook to my new. If I have iCloud enabled on both devices, is this simple, or is there a limit to what I can transfer? For example, can I upload word files to iCloud?

    iCloud is not the way to do this. You should use Migration Assistant - with this you can transfer your complete User folder from the old Mac including preferences and logins. You will need to connect the two with FireWire or USB depending on the models.
    Ideally you should do this before you set up the new Mac - if you create a user account with the same name than the Migration will have to give the migrated user folder a different name. When you first switch on the new Mac it should ask you if you want to transfer your data, and give you instructions.

  • Where can I find one of those silicone body covers (not hardshell) for the Mac Book Pro? And is this a good idea?

    Where can I find one of those soft silicone body covers (not hardshell) for the Mac Book Pro? And is this a good idea since Apple no longer makes them? I-phones use them now.

    Personally I use the Speck hard case on both of my MacBooks and they are the greates! Look around on Amazon and eBay and you can find them for $30-40. I wouldn't really recomend a silicon case for a macbook, but it's your preference.

  • TS2755 I have a new iPhone 5 from T-Mobile. I can send simple texts just fine. However, I have to turn off wi-if and enabler cellular to send texts to more than one person or to attach a picture. Is there a way around this?

    I have a new iPhone 5 from T-Mobile. I can send simple texts just fine. However, I have to turn off wi-if and enabler cellular to send texts to more than one person or to attach a picture. Is there a way around this?

    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.

Maybe you are looking for

  • Accidentally deleted bonjour from my computer.  iTunes will not open.  Help Please.

    Accidentally deleted Bonjour from my computer.  iTunes will not open.  Running Windows XP. Help please.

  • How to do Data Masking in SAP?

    Hello All, How to do Data masking in SAP, My Client has a production data, so we have to create a development environment with this production data but the data should be masked/changed with some dummy data, and it should work as test data for develo

  • Mysql and Java

    Hi, can you do me a favor got the following exception when I run the below code in the JBuilder4. java.lang.NoClassDefFoundError: java/sql/Savepoint      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)      at java.sql.D

  • Problem with SelectBooleanCheckbox

    I'm a beginner with JSF. Trying to get a form working that uses checkboxes (among other things). I have the following column entry in an jspDataTable: <h:form> <h:dataTable value="#{fnc.objVector}" var="fnc" first="#{fnc.startIndex}" rows="2"> <f:fac

  • Need helps with getting ODI CDC to work

    Hi, I'm new to ODI. I'm trying to get the ODI CDC to work and for now I'm only interested in seeing that the changes are captured correctly. I've set the d/b to archivelog mode and granted all the rights I can think of to the d/b user. I've defined t