Results 1 to 3 of 3

Thread: Float div in bottom right of screen...

  1. #1
    Join Date
    Apr 2014
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Float div in bottom right of screen...

    I want to create a contact div that is always on the bottom right of the screen and scrolls with the page. Can I do this in css? I am hesitant to use javascript because I have only been able to manage to get one script to work on my page at a time and don't want to break it.

    I tried all sorts of positioning but haven't been able to figure it out. Any help is appreciated!

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    You sure can. Pop this into your markup and tweak away;
    Code:
    <div style="border:1px solid red; position:fixed; bottom:0; right:0; width:250px; height:150px;">FIXED CONTENT</div>
    You can also separate the CSS and put it in your stylesheet;

    HTML
    Code:
    <div class="fixed-box"></div>
    CSS
    Code:
    .fixed-box {
    border:1px solid red; 
    position:fixed; 
    bottom:0; 
    right:0; 
    width:250px; 
    height:150px;
    }
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. The Following User Says Thank You to Beverleyh For This Useful Post:

    apriljoanne (05-07-2014)

  4. #3
    Join Date
    Apr 2014
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Thank you! It worked! I had a similar code that half worked but couldn't figure out why it disappeared toward the footer of the page. I needed to add a z-index. I didn't think to add a border for testing- helped a ton in figuring it out

Similar Threads

  1. How to change menu from left of the screen to the right of the screen?
    By EdThaSt0rm in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 08-31-2009, 09:47 AM
  2. Looking for a script to display banners in bottom part of the screen
    By ainarsgc in forum Looking for such a script or service
    Replies: 10
    Last Post: 02-18-2009, 02:26 PM
  3. Replies: 8
    Last Post: 12-06-2008, 09:13 AM
  4. Screen Resolution & Width of the Screen
    By jelumalai in forum Graphics
    Replies: 4
    Last Post: 11-21-2008, 11:22 AM
  5. Box at Top & Bottom of the screen.
    By flash37 in forum CSS
    Replies: 3
    Last Post: 05-16-2008, 10:15 PM

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
  •