Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Jul 2011
    Posts
    93
    Plugin Contributions
    0

    Default how do I add images using absolute positioning?

    Hi, I've done this on other sites before but I cant seem to get it to work on this one. Here is what I was trying for a test to see where it is and adjust but nothing shows.
    Code:
    #sticky {
    	background-image: url(../images/sticky.png);
    	position:absolute;
    	left:168px;
    	top:143px;
    	}
    Best Regards,
    Scott
    My test site

  2. #2
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: how do I add images using absolute positioning

    Sorry, but I have to ask. Is sticky.png in the images folder in your template's folder? Or is it in the main images folder? Your style refers to the former location.

    Also, just as a test, make the image a jpg and see if it works. (You never know.)

    Rob

  3. #3
    Join Date
    Jul 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: how do I add images using absolute positioning

    I changed them to jpg and I uploaded it to both folders and also changed the css to reflect the jpg. Still nothing.
    Best Regards,
    Scott
    My test site

  4. #4
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: how do I add images using absolute positioning

    This piece of code seems to be okay, but maybe you8 made an error in the code before #sticky. See is you can find any missing brackets or semicolons.

  5. #5
    Join Date
    Jul 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: how do I add images using absolute positioning

    I checked and no missing brackets or semicolons.

    Just to make sure though, when using this code it should show the image on top of anything else in the page, right? I mean it isn't hiding under another image or anything.

    Also I shouldn't have to put anything on the page it should just show because the css says it is supposed to. right?

    I've changed the numbers around as well as the images and I can't ever get anything to show. I have the code added to the index_home.css at the bottom. Should the placement make a difference. I have also tried this on the stylesheet.css and still nothing on the other pages as well.
    Best Regards,
    Scott
    My test site

  6. #6
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: how do I add images using absolute positioning

    Quote Originally Posted by ScottDB View Post
    I checked and no missing brackets or semicolons.

    Just to make sure though, when using this code it should show the image on top of anything else in the page, right? I mean it isn't hiding under another image or anything.

    Also I shouldn't have to put anything on the page it should just show because the css says it is supposed to. right?

    I've changed the numbers around as well as the images and I can't ever get anything to show. I have the code added to the index_home.css at the bottom. Should the placement make a difference. I have also tried this on the stylesheet.css and still nothing on the other pages as well.
    I is possible it is "hiding" underneath something else. what happens if you add a z-index to it?

  7. #7
    Join Date
    Jul 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: how do I add images using absolute positioning

    Don't know what you mean by a z index to it. Never seen that one before. Can you show me the code to add?
    Best Regards,
    Scott
    My test site

  8. #8
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: how do I add images using absolute positioning

    Code:
    #sticky {
    	background-image: url(../images/sticky.png);
    	position:absolute;
    	left:168px;
    	top:143px;
    	z-index:5;
    	}

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: how do I add images using absolute positioning

    What element has the #sticky id? I don't see it in your homepage view source. Does it have something else in it beside the background-image? If not, there will be nothing to give it size and you will not be able to see it.

  10. #10
    Join Date
    Jul 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: how do I add images using absolute positioning

    Oh ya, sorry about that. I took it out when doing some more editing figuring that it wasn't working anyway. I was trying to put in the define page editor for main page. I take it that is not where it should go. Not sure where to put it or if I got it right.

    Here is what I am trying to use.
    Code:
    <div class="sticky">
    Best Regards,
    Scott
    My test site

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Absolute Positioning of Login and Account Links in Header
    By bsteinagel in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Mar 2009, 11:01 AM
  2. How do I add extra images to a product using javascript
    By southernlady in forum General Questions
    Replies: 8
    Last Post: 14 Jan 2009, 08:26 PM
  3. Absolute positioning of video on define pages
    By Visionvek in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 30 Jul 2008, 03:26 PM
  4. absolute positioning inconsistent in firefox and IE (TABS PRO)
    By james739 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Jul 2008, 03:22 PM
  5. css absolute positioning IE and firefox problem
    By james739 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 18 Jun 2008, 03:32 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
  •  
disjunctive-egg