+ Reply to Thread
Results 1 to 3 of 3

Thread: Small css problem

  1. #1
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Small css problem

    Hope this is simple lol.

    I have a fairly standard layout with fixed width #wrapper and auto padding left and right.

    I am trying to get a status bar div to sit over a header image (z-index 2000), but it is stuck relative to the right of the browser edge.. not the wrapper. In effect, when the browser window increases in size, the general layout borders stretch to suit, but this div stays to the right, moving it off the place I want it to be.

    If I set position as relative or static, the div forms it's own box and shunts the other divs down out of position - i.e. not sitting in a layer over the header img.

    This statusbar div is between the #wrapper div tags.

    css

    Code:
    .statusbar{
            position: absolute;
            color:#006666;
            width: auto;
            z-index: 2000;
            right: 10px;
            top: 70px;
        }
    You can see my problem on the test page at http://www.freecrm.x10hosting.com/css2/csstest.php

    The problem area is the "you are logged is as" section top right

    Any ideas?

  2. #2
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    Re: Small css problem

    instead of putting the image in there as an object why not put it as the background to the header div. That way you can put the status bar div's position to relative and float it to the right inside the header div. that way instead of it hugging the side of the body (from the absolute positioning) and hug the right side of the header div.

  3. #3
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: Small css problem

    Quote Originally Posted by garrensilverwing View Post
    instead of putting the image in there as an object why not put it as the background to the header div. That way you can put the status bar div's position to relative and float it to the right inside the header div. that way instead of it hugging the side of the body (from the absolute positioning) and hug the right side of the header div.
    Now why didn't I think of that...

    Thanks for this - I'm sure it will work fine.

    Rich


    EDIT
    __________

    Worked a treat! - had some minor issues with positioning and <p> tags but got it sorted and looks great - thanks.
    Last edited by freecrm; 01-30-2010 at 05:18 AM.

+ Reply to Thread

Similar Threads

  1. Which is the problem of my account? Part 2 xD
    By GodMew in forum Free Hosting
    Replies: 2
    Last Post: 01-17-2008, 09:57 AM
  2. Cossacks Problem Again!!
    By muhammadsameja in forum Free Hosting
    Replies: 1
    Last Post: 01-08-2008, 10:47 AM
  3. Replies: 2
    Last Post: 12-14-2007, 09:21 AM
  4. small problem
    By blackpsycho in forum Free Hosting
    Replies: 6
    Last Post: 11-18-2007, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers