How can i make my site background get longer or shorter according to content?

Discussion in 'HTML & Website Design' started by Anveto, Apr 4, 2010.

  1. #1
    I want my site to expand and contract depending on how much content I have, my site is accessmarkspixel.com and as you can see the content on some pages is much longer or shorter than the background image, how can i make it get longer automatically depending on content?
     
    Anveto, Apr 4, 2010 IP
  2. Freditpl

    Freditpl Peon

    Messages:
    28
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,
    Please try use following construction.
    
    <div class="content">
    	<div class="in-content">
    		some content here 
    	</div>
    </div>
    
    Code (markup):
    class content - does have gradient background without any line or glare (some pixel from footer of image for in-content background)
    class in-content - does have gradient background with line or glare
    so when you have small content will be display background from in-content else it will display backgrounds from in-content and content
     
    Freditpl, Apr 4, 2010 IP
  3. pjamesmg

    pjamesmg Member

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    You can also do this with css by repeating it on either the y or x axis.
     
    pjamesmg, Apr 4, 2010 IP
  4. edesigner008

    edesigner008 Guest

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It is better to use CSS for your requirement.
     
    edesigner008, Apr 6, 2010 IP