SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: CSS Positioning

  1. #1
    SitePoint Member
    Join Date
    Dec 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Positioning

    I am trying to position a weather php script to display on my home page, but having an issue with it not being in the correct place when someone minimizes their browser it is off set, I am sure it has to do with the absolute setting in my css
    Code:
    div.wrapper div.content div.weather
    {width: 200px; height: 0px; position: absolute; top:200px; left:690px; margin: 0;}
    here is a link to the site so you can view what is happening with it when you change you browser size.

    http://plano.mylocallookup.com/

    the weather should stay place directly above the image of the ballons

    this is the code in the index page

    Code:
    <blockquote class="middleContent">
    		<div class="weather"><? include(EDIRECTORY_ROOT."/weather8.php"); ?></div>
    		<?
    		if ($sitecontent) {
    			echo "<div class=\"dynamicContent\">".$sitecontent."</div>";
    		}
    		?>
    I am just doing an include of the weather8.php and trying to control the placement of it with the css.

    I have tried fixed, absolute, and relative. The closest I have gotten to get it correct is using absolute.

    Thanks for you help in advanced

  2. #2
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you need to do is make the weather element relative to the middle column instead of the entire document.

    First, add "position:relative;" to this rule: "div.wrapper div.content blockquote.middleContent"

    Then adjust the 'top' & 'left' values on "div.wrapper div.content div.weather" so it is positioned where you want it to be.

    ps. You should delete the other thread. (http://www.sitepoint.com/forums/show....php?t=541342)
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  3. #3
    SitePoint Member
    Join Date
    Dec 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That worked

    THANKS! JimmyPaddy I just need a fresh pair of eyes. I so focused on just php and css i didn't catch that...Thank again

    gonzo


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
  •