CSS Problem - Code Does Not Overlap? (6 posts)

  1. opq
    Posted 9 years ago #


    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!

  2. maerk
    Posted 9 years ago #

    A link always helps ;)

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

  3. opq
    Posted 9 years ago #

    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?

  4. maerk
    Posted 9 years ago #

    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.

  5. opq
    Posted 9 years ago #

    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?

  6. Yngwin
    Posted 9 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic