Jump to content

Table Alignment/CSS divs


pindian

Recommended Posts

Hi Guys,

 

My 1st post so take it easy!!!

 

Ok - i am making a website. I started using CSS and divs for the website. However, crossbrowser design is a nightmare. I designed using explorer (i know, my mistake), mozilla shows someting totally different.

 

Now - i am back to tables! I know this isnt ideal - but it works well!

 

However i am stuck. I have a table within <td></td>. In mozilla the table is aligned top, in explorer the table seems to float. How can i make it align top in explorer??

 

   <td width = "200"> 
      <div align="left" valign="top"> 
        <table valign="top" width="200" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td valign="top"><a href=""><img src="images/postAd.png" border="0" valign="top"></a></td>
          </tr>
          <tr> 
            <td><img src="images/editAd.png"></td>
          </tr>
          <tr> 
            <td><img src="images/subscribe.png"></td>
          </tr>
        </table>
      </div>
    </td>

Link to comment
Share on other sites

You are trying to fix one mistake (designing in IE) with another (switching back to tables). Both of these are BAD ideas. Start from scratch and do it the right way - use firefox/opera etc and design your site using valid (x)html and CSS, then adjust for IE. If you are having some troubles with your CSS, then come here and ask for help with it. It may not be the easiest thing to learn (the basics are easy, but overall it can be tricky), but getting over that hump is necessary if you want to design well.

Link to comment
Share on other sites

It depends. If its a commercial site, then yes there are problems. Tables aren't indexed as well by search engines, and SEO rankings go down. Pages also take longer to load when built with tables, and require more overhead from the server.

 

And there is one very good reason why tables shouldn't be used to layout sites - its wrong. Tables are supposed to be used for tabular layout (cross referencing categories). Layouts are not tabular information.

 

However, if its someone designing a non-commercial site for themselves, then while all the above points are still true and applicable, they don't really matter.

Link to comment
Share on other sites

tables are NOT easier than css/div layouts - this is a common untruth...

 

Fact is its the learning curve that is difficult.  There are 3 stages that make css layouts for easier to accomplish than the table based 'counter-parts'.

 

1. Site Build.

2. Site Maintenance.

3. Site Use.

 

(Basically ALL THE TIME).

 

Most on here don't have the time to do everything for you - so go and learn.  I have said this before and will say it again....

 

A couple of days hard study on css layouts will give you more than time spent on any other facet of web development ever could.

 

Just because you don't get it right first time is NO reason to give up.  I still maintain that in the middle to long run css layouts are easier and will save you LOTS of time and heartache.

Link to comment
Share on other sites

I agree fully. I was updating a site yesterday that I previously made with tables, and what a headache that was. I ended up ripping down the page I was working on and redoing it with CSS. Maybe some day in the future I will go back and do the rest of the the site.

Link to comment
Share on other sites

the main problem with tables is simply the sheer amount of work and code necessary to code something that could be done within minutes using css.

 

I would also like to pose a question. How do you style links, lists, rollovers, paragraphs, etc without using css?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.