SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    positioning an element top right in a centered site - all browsers

    heya everyone, sorry for my very general post last week, i am down to the final problem

    I have a little problem positioning a page element in the top right hand corner of my page - which is centered so means I can't use absolute positioning right?

    The page I am trying to recreate is: www.lsbu.ac.uk - search box top right.
    My test page is http://www.lsbu.ac.uk/sbucomm/rossNe...ageLayout.html and the css for that page is http://www.lsbu.ac.uk/sbucomm/rossNe...ositioning.css I have cleaned up the CSS so hopefully it should be easy finding what is the problem bit, its the searchBox section - the css I am currently using is:
    Code:
    #searchBox {
    	background: #333333;
    	height: 62px;
    	width: 205px;
    	position: absolute;
    	top: 0;
    	right: 0;
    	float: right;
    }
    any help would be great, its certainly been a right pain so far and I managed to fix everything else

    thanks in advance,

    ross

  2. #2
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here.

    Put the searchbox inside the header and make the header div position:relative.

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And remove the float:right rule.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

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