1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Trying To Get An Image To Line Up

Discussion in 'HTML & Website Design' started by bad_bob00, Feb 18, 2010.

  1. #1
    Hi,

    I'm trying to get an image to line up on my site but not too sure how to do it.

    The code on my HTML page is:

    And in my CSS file the code is:


    Here is a screenshot:
    [​IMG]

    I want the image in the center of the header image if possible.


    Thanks for any help!
     
    bad_bob00, Feb 18, 2010 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    Delete hspace="500", write this to css and change the image position by changing left and top pixels:

    #sitename img{
    position: absolute;
    left: 500px;
    top: 50px;
    }
     
    s_ruben, Feb 18, 2010 IP
  3. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #3
    Thank you so much again s_ruben! Thats done the job perfectly :)

    Next question... any idea how I can shift the site over into the center of the page? Not exactly the center but I want the site to be aligned central horizontally and to be a few pixels down from the top of the page vertically.
    I've done a quick design below at the link below.

    http://img62.imageshack.us/img62/91/designj.jpg


    Thanks again
     
    bad_bob00, Feb 23, 2010 IP
  4. AlternativeWeb

    AlternativeWeb Peon

    Messages:
    140
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4

    You see where it says LEFT and TOP? Change the 500px and the 50px till you get have it where you want it to be.
     
    AlternativeWeb, Feb 23, 2010 IP
  5. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #5
    Thanks for trying to help but the image is in a good position now, what I'm trying to do is to shift the whole site so its lined up more centrally...


    Thanks
     
    bad_bob00, Feb 24, 2010 IP
  6. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #6
    Can you write the url of the website?
     
    s_ruben, Feb 24, 2010 IP
  7. AlternativeWeb

    AlternativeWeb Peon

    Messages:
    140
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You can try and add the following below to your main container:
    margin: 0 auto;
    HTML:
    But what Ruben suggested would help a great deal.
     
    AlternativeWeb, Feb 24, 2010 IP
  8. christyk

    christyk Peon

    Messages:
    22
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You can get the url from the image. However, it looks like you are all set now? The site width is flexible, so it fills my full window with content and sidebar.
     
    christyk, Feb 24, 2010 IP
  9. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #9
    Sure, I didn't upload the new design to the site until now because I don't want the visitors to see an unfinished site.

    What I've done is to make the length a set width (I don't want it to be %100) and I still want it to be centered with a black border.

    http://www.paidskillgames.com/newdesign.html


    Also not quite sure why but its appearing different on the website then when I'm viewing it offline... Offline the "stuff goes here..." text has been set to appear on the left below the menu, and it has a white background.


    Thanks again for all the help so far!
     
    bad_bob00, Feb 25, 2010 IP
  10. OhJay

    OhJay Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    This. Apply that CSS to the container div.

    #container {margin: 0 auto;}
    HTML:
     
    OhJay, Feb 25, 2010 IP
  11. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #11
    Okay thanks I've added that now, but any idea how to get it central on the page?


    Thanks :)
     
    bad_bob00, Feb 25, 2010 IP
  12. AlternativeWeb

    AlternativeWeb Peon

    Messages:
    140
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #12
    background-color: white;
    HTML:
    is what making the white background.

    Find:
    #new {
    float: left;
    background-color: white;
    width: 60%;
    padding-left: 15px;
    }
    HTML:
    Replace with:
    #new {
    float: left;
    width: 60%;
    padding-left: 15px;
    }
    HTML:


    You are missing a div tag at the end.

    Find:
    </body>
    </html>
    HTML:
    Replace:
    </div>
    </body>
    </html>
    HTML:

    There actually many errors with this page. Give me a few mins to fix it up.
     
    Last edited: Feb 25, 2010
    AlternativeWeb, Feb 25, 2010 IP
    bad_bob00 likes this.
  13. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #13
    Thanks again for the help, I've uploaded those changes.

    How about making it all central now? :)
     
    bad_bob00, Feb 25, 2010 IP
    AlternativeWeb likes this.
  14. OhJay

    OhJay Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Hah, sorry, you don't need the #container {} part again.

    Should be:

    #container {
    background:#f0f0f0 url(alt-img/bodybg-red.jpg) repeat-x;
    color:#303030;
    min-width:770px;
    padding:0;
    text-align:left;
    width:85%;
    margin: 0 auto;
    }
    
    Code (markup):
    not
    #container {
    background:#f0f0f0 url(alt-img/bodybg-red.jpg) repeat-x;
    color:#303030;
    min-width:770px;
    padding:0;
    text-align:left;
    width:85%;
    #container {margin: 0 auto;}
    }
    
    Code (markup):
     
    OhJay, Feb 25, 2010 IP
    bad_bob00 likes this.
  15. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #15
    Thanks OhJay, changed that code now too :) its looking good...
    Any idea how to get the background to be white, behind the "stuffgoeshere" text?
    And how to add a black border?

    Thanks!
     
    bad_bob00, Feb 25, 2010 IP
  16. OhJay

    OhJay Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Dude, I can't just build your whole site for you :)

    Try:

    #new {
    background-color:#FFFFFF;
    border:1px solid #000000;
    float:left;
    padding:20px;
    width:60%;
    }
    Code (markup):
     
    OhJay, Feb 25, 2010 IP
    AlternativeWeb likes this.
  17. yourthemes

    yourthemes Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #17
    no offense but do you know how to code at all?
     
    yourthemes, Feb 25, 2010 IP
  18. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #18
    Nope :( but I've got quite far in the thread without someone pointing it out already :)


    Thanks again OhJay, that half worked, the black border was showing on the small white (#new) div/box but I wanted the border to show around the whole site.

    Its okay if you don't want to help, but if someone does it would be much appreciated :)
     
    bad_bob00, Feb 26, 2010 IP
  19. AlternativeWeb

    AlternativeWeb Peon

    Messages:
    140
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #19
    AlternativeWeb, Feb 26, 2010 IP
  20. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #20
    bad_bob00, Mar 1, 2010 IP