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.

How to fix sidebar in HTML?

Discussion in 'HTML & Website Design' started by WonderingCoder, Oct 16, 2013.

  1. #1
    I have a custom template for my website:
    http://www.101baseballnews.com

    If you notice, I have an ad running on the sidebar below "popular post". Now, the sidebar is too small (width wise) to hold the ad fully. The ad is 300x250 width, but even though my sidebar says 301px in the HTML code, it doesn't fit.

    Help?
    SEMrush
     
    WonderingCoder, Oct 16, 2013 IP
    SEMrush
  2. undergroundseo

    undergroundseo Active Member

    Messages:
    121
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    73
    #2
    There you go, you can simply add a style in your style sheet or just inline style in a div for the image. Here is an example of it edited: [​IMG]
     
    undergroundseo, Oct 16, 2013 IP
  3. WonderingCoder

    WonderingCoder Greenhorn

    Messages:
    86
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    8
    #3
    Looks great! But I'm not sure what you mean by adding it to my "style sheet'.. :(

    What do you mean? :(
     
    Last edited by a moderator: Oct 23, 2013
    WonderingCoder, Oct 16, 2013 IP
  4. undergroundseo

    undergroundseo Active Member

    Messages:
    121
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    73
    #4
    Ok well here is another way your could do it:

    <div style="width:280px; height:250px;"><a href="http://your-ad-url"><img src="http://your-ad-image-link" /></a></div>
    HTML:
     
    undergroundseo, Oct 16, 2013 IP
  5. WonderingCoder

    WonderingCoder Greenhorn

    Messages:
    86
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    8
    #5
    Do I need to put that code in a certain place in the HTML? I tried putting it on line 1 and got this message:
    Error parsing XML, line 2, column 6: The processing instruction target matching "[xX][mM][lL]" is not allowed

    I forgot to tell you the website is run through blogger -- maybe that's causing the problem?
     
    WonderingCoder, Oct 16, 2013 IP
  6. undergroundseo

    undergroundseo Active Member

    Messages:
    121
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    73
    #6
    Humm well you are going to need to place it at a specific spot. Hard to direct your properly without seeing what you are trying to do.
     
    undergroundseo, Oct 16, 2013 IP
  7. WonderingCoder

    WonderingCoder Greenhorn

    Messages:
    86
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    8
    #7
    I understand I'm being vague.. but what I'm trying to do is lengthen the sidebar.. just like you had it in your edit picture.

    i.e., how can I get the edit picture you posted on my website.

    If that makes sense :/
     
    WonderingCoder, Oct 16, 2013 IP
  8. undergroundseo

    undergroundseo Active Member

    Messages:
    121
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    73
    #8
    Well i did not edit the sidebar in fact I edited the image to the width of 280px which gives it that look of 10px clear of hitting the border
     
    undergroundseo, Oct 16, 2013 IP
  9. WonderingCoder

    WonderingCoder Greenhorn

    Messages:
    86
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    8
    #9
    Oh, I see.. So, how would I do that in the HTML?

    This is what it looks like for me. See how the ad is cut off? How do I fix that??
     

    Attached Files:

    Last edited by a moderator: Oct 23, 2013
    WonderingCoder, Oct 16, 2013 IP
  10. Ajayu1992

    Ajayu1992 Active Member

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    73
    #10
    http://puu.sh/4S9RN.png

    I fixed it for you editing the css.

    Open the index page in Notepad++


    Change width in #rsidebar-wrapper from 301px->350px
    Change width in #main-wrapper from 645px ->600px

    This would do the charm !
     
    Ajayu1992, Oct 17, 2013 IP
  11. sherlin_george

    sherlin_george Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #11
    Editing the image size would work for you. Even if the problem exists, you can make slight changes in the css.
     
    sherlin_george, Oct 17, 2013 IP