• Hi,

    I am having weird problems with CSS. So I’m starting my template from scratch. Eveyrthing looks great in the test HTML file I made but when I copy everything exactly into WordPress I get quirky things if I split it into an index, header and footer file.

    I put my css into a plain style.css file:

    #nav_menu {
    position: relative;
    top: -4;

    border-width: 1px 0px 1px 1px;
    border-style: solid;
    border-color: #AAAAAA;

    background-color: #555555;
    }

    For example, the code above is applied like this:

    (Table 1)
    (Table 2: Nav Menu)
    (Table 1 continues)

    However, when I put the code into PHP it doesn’t make the table float. Also, any other top/left movement I do with text etc does not show up. If I stick the CSS code onto the same page as the php, the aligning works for my title, subtitle etc but still no go for the table.

    Is there something wrong with the purposefully overlapping code above? Or am I doing smth wrong? Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • A link always helps ??

    Why are you using tables? Surely something like a <ul> would be better for the nav menu?

    Thread Starter opq

    (@opq)

    I don’t have anything to post because I’m testing it on a local web server.

    I’m trying to structure the whole page so that it’s basically 3 vertical table cells, the middle containing another table which will contain the navigation (which will use lists).

    Upon further experimentation it seems that the floating CSS does not even work with anything (including text!). What’s wrong? Does wordpress have something that overrides this?

    CSS floats do work, they’re used all over the place. If you stop using tables in your HTML it might help, tables are dealt with in a certain way and that might be interfering with the CSS.

    Thread Starter opq

    (@opq)

    So why does it work when I don’t put it into WordPress?

    Anyways, if you can give me an example of how I can replace a table like this with CSS that’d be great.

    My table has two vertically arranged cells. Each with its own background image. Is this possible in CSS?

    top: -4;
    4 what? And if you want it to float, maybe you should use float? Anyway, without some example online it is hard to tell what you want and where it goes wrong.

    And yes, you can do all that with CSS.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CSS Problem – Code Does Not Overlap?’ is closed to new replies.