WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] html table not showing correctly (6 posts)

  1. nicolamarywyatt
    Member
    Posted 2 years ago #

    Hello

    I have posted this on the Woo themes support board also, but have always had more luck on the wordpress forum. I think this is more of a universal problem im having as I am currently using a number of themes and this issue keeps coming up.

    My problem is this:

    I have created a header using dreamweaver and photoshop, however when I insert it into my site the formatting is all wrong. there is way too much space and padding inserted and no matter what i do i just can get rid of it.

    Here is what it looks like:
    http://store.scottmove.co.uk/host/screengrabhelp1.jpg

    and here is what is SHOULD look like:
    http://store.scottmove.co.uk/host/screengrabhelp2.jpg

    On the second example, i have put the table into an iframe so that it displays correcly, but this throws up massive problems when looking at the site on a mobile device as the iframe is not dynamic (if thats the right term?!)

    Im guessing its going to be something to do with the CSS in the style sheet? I am useless with CSS and cant figure out what I need to do in order to get this to work...

    If you want to look at the code for my site, I have attached the stylesheet and header.php code below:

    STYLESHEET:
    http://store.scottmove.co.uk/host/shelflifestyle.css

    Header Code:
    http://store.scottmove.co.uk/host/headerexample.html

    If anyone can help me out on this i would be eternally grateful! Seriously!!!!!!

  2. peredur
    Member
    Posted 2 years ago #

    A link to your site would make it a lot easier for us to help, because we can use Firebug or equivalent to sort out what's going on.

    In general, the use of tables for layout is deprecated. You're likely to get better results using proper, semantic HTML with CSS. However if you're inheriting this from your theme I can see why you'd not want to mess with it.

    Cheers

    PAE

  3. nicolamarywyatt
    Member
    Posted 2 years ago #

    Hiya, thanks for the reply. I am, sadly a novice so using photoshop and dreamweaver to create my table from image slices is the only way i know how :(

    my web can be found at http://www.store.scottmove.co.uk

    Thanks again :)

  4. Andrei Olsen
    Member
    Posted 2 years ago #

    Default table styles are defined on line 2923 is your style.css. There you have width:100% and 100% of container (body) is, well, the whole screen width.

    Add this to your CSS file:

    #Table_01 {
        border: 0;
        margin: 0 auto;
        width: 950px;
    }
    
    #Table_01 td {
        border: 0;
        padding: 0;
    }
  5. nicolamarywyatt
    Member
    Posted 2 years ago #

    Hi Andrei
    That works a treat and thats a massive help thanks a million... however is there a way to make the width dynamic so that it will resize automatically for mobile? ive been playing around with "auto" etc and then it looks fine on the iphone but then it just throws out the table formatting in the browser...

    Really appreciate your help on this! x

  6. nicolamarywyatt
    Member
    Posted 2 years ago #

    just changed the width to 100%... thanks for all your help!

Topic Closed

This topic has been closed to new replies.

About this Topic