WordPress.org

Ready to get started?Download WordPress

Forums

HTML tables and spacing (9 posts)

  1. hmphotomn
    Member
    Posted 1 year ago #

    I'm having trouble spacing something correctly on my page.

    I have two objects on the page and I wanted them side by side. I used the table html code to do that. But now I can't get the objects to be horizontally even.... the object on the left is a half of a page lower than the object on the right, and I want them both aligned evenly.

    Any advice would be great, thanks.

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Impossible to even guess without seeing the site...

    But tables are generally not the way to work with layout issues. Try using divs and the float attribute:

    http://www.w3schools.com/css/css_float.asp

    Firebug is a great tool for working with CSS:
    https://getfirebug.com/

    Also, be sure to validate your page to find possible coding errors:

    http://codex.wordpress.org/Validating_a_Website

  3. If you're wanting to have things in a html table, you'll need to add some css. Something like:

    td {
    text-align:center;
    vertical-align:center;
    }

    Like @wpyogi mentioned, it would be easier to help if we could see your site.

  4. hmphotomn
    Member
    Posted 1 year ago #

    Sorry. Knew I had forgotten something.

    http://hmphotographymn.com/contact/

    Thanks for the answers so far. I don't really know what they quite mean, but I'm willing to learn and/or do the research.

    Any more tips would be great, much appreciated!

  5. I don't really know what they quite mean, but I'm willing to learn and/or do the research.

    So you didn't do the CSS for this site?

    As far as I can see there's no style at all for tables in this theme.

    Instead of trying to get this in a table, have you tried simply inserting the image of Heidi and floating it to the right? Normally all themes have a class called .alignright.

  6. hmphotomn
    Member
    Posted 1 year ago #

    No, I didn't. I don't know anything about CSS. I'm not terrible with html but I've never had to design anything for myself, I used to have someone who helped me with this sort of thing, but I don't any longer. Hence my searching the internet for answers, YouTube tutorials, and coming to the forums :)

    What is a "class"? I could try that!

  7. Instead of inserting a table in your content, just insert your image and choose float right. Hopefully the theme has the class all set and the image will automatically align to the right.

  8. hmphotomn
    Member
    Posted 1 year ago #

    That sort of worked.

    I looked up the CSS for float right and did what the instructions said and it did work. First time ever, I got to see the two objects side by side. But a couple problems remain:

    1 - The logo on the page also shifts to the right.
    2 - The menu text under the logo shifts too.
    3 - The left object (contact box) is too tight against the logo and menu.
    4 - There is no space between the object and I need a teeny bit of space there.

  9. hmphotomn
    Member
    Posted 1 year ago #

    The image is currently underneath the contact form - so apparently I did something wrong. Can anyone give any more advice on how I can fix this?

Topic Closed

This topic has been closed to new replies.

About this Topic