www.webdeveloper.com
Results 1 to 4 of 4

Thread: Alignment issues in script?

  1. #1
    Join Date
    Aug 2012
    Posts
    4

    Alignment issues in script?

    So basically I am an amateur in web development, but I am trying to code a website for my band.
    I am attempting to incorporate a design I sketched, as I am quite fluent in graphic design, but I cannot align a table properly within an accordion a buddy of mine helped me set up.
    I set up a demo-site to better help everyone understand what I am talking about.

    DEMO

    Any tips on the mending of this problem?

  2. #2
    Join Date
    Aug 2012
    Posts
    4
    NEVERMIND! Fixed the problem on my own.

  3. #3
    Join Date
    Sep 2011
    Location
    Bristol, England, United Kingdom
    Posts
    192
    Just a tip, but if you're entering the world of web design as a graphic designer, consider tableless CSS in favour of HTML tables for layout and presentation, you'll thank yourself later.

    Something along the lines of:

    Code:
    <style type="text/css">
    #your_div
    {
        width: 250px;
        height: 250px;
    
        display: block;
        position: relative;
    
        border: 1px solid #000;
    }
    </style>
    
    <div id="your_div">&nbsp;</div>
    Instead of:
    Code:
    <style type="text/css">
    #your_table
    {
        width: 250px;
        height: 250px;
    
        display: block;
        position: relative;
    
        border: 1px solid #000;
    }
    </style>
    
    <table id="your_table">
        <tbody>
            <tr>
                <td>&nbsp;</td>
            </tr>
        </tbody>
    </table>

  4. #4
    Join Date
    Aug 2012
    Posts
    4
    Thanks! That actually helps a lot. I've already updated the layout, just not on webs.com. One question though: when declaring the attributes of the div, you have "display: block;". Is that the default display type?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles