Moving an element left

Discussion in 'HTML & Website Design' started by TheNoose, Mar 28, 2009.

  1. #1
    I need to move the left side menu left about 5-10px so it lines up with the header: www.xqpx.com

    I've tried a few things but nothing seems to move it.

    Here's the CSS:

    .bg_sidenav {
    background-image: url(../images/bg_navside.gif);
    width: 100px; /* 187px;*/
    }

    .bg_side {
    width: 310px; /*216px;*/
    background-image: url(../images/bg_sidefix.jpg);
    }
    .bg_side02 {
    background-image: url(../images/bg_side_right.gif);
    width: 54px;

    Here is the html:

     
    TheNoose, Mar 28, 2009 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    Here's a tip, if you are only going to have one TD per TR, there is NO REASON TO BE USING A TABLE - PERIOD.

    You're code is all over the place from a hodge-podge mismatch of CSS and old school presentational markup - pick one, not both.

    Some advice - forget everything you know about building a website as you are knee deep in presentational markup, and go get Ian Lloyd's book "Building a website the right way with HTML & CSS" and start over as if a nube... becuase you are so far down the wrong path it's the only practical option.

    As evidenced by the 21k of markup for barely over 1k of actual text content on the page and the 91 Validation errors meaning you don't even have HTML, you have gibberish.
     
    deathshadow, Mar 28, 2009 IP
  3. StrangeLife

    StrangeLife Well-Known Member

    Messages:
    269
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Hey Noose!

    The coding you are using is very old and you should get into using divs and class elements, give each part of your design a div or class and get rid of your tables..

    I played around with it, you use a bit of css and tables.. look for..

    in your css

    and replace with this

    This fixes the sidebar but also creates a problem for your footer, you need to give your footer a div id, then you can adjust easily.


    Then you need to make your content box a little bigger, look for...

    and replace with...

    Hope this helps...
     
    StrangeLife, Mar 28, 2009 IP
  4. TheNoose

    TheNoose Peon

    Messages:
    1,005
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the replies guys.

    Trust me, I realize the code is a mess... that is actually some of the cleaner code for the site. I bought this site from built2go and have been messing with it for a week trying to decipher it. I wish it used div.

    For instance I've got like 2 separate files for the header, the second one only has a bunch of closing tags... while the first one calls the second one at the end or something... why would they do that ><
     
    TheNoose, Mar 28, 2009 IP
  5. StrangeLife

    StrangeLife Well-Known Member

    Messages:
    269
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    140
    #5
    lol. Probably something like PHP includes, why not give Wordpress a go, you can pretty much accomplish what your doing by using Plugins and slight modifications.
     
    StrangeLife, Mar 28, 2009 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #6
    Oh yeah, great advice, wordpress...

    Batting zero there buddy. Given you have to effectively gut it to even approach modern markup techniques, that's net change zero, and probably MORE vulnerable - after all turdpress won this years pwnie for a reason.
     
    deathshadow, Mar 28, 2009 IP
  7. TheNoose

    TheNoose Peon

    Messages:
    1,005
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #7
    .bg_side { /*216px;*/
    background-image: url(../images/bg_sidefix.jpg);
    float: left;
    padding-left: 30px;
    width: 250px;
    padding-right: 30px;
    }


    Unfortunately this didn't work.
     
    TheNoose, Mar 28, 2009 IP