Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: Center div in height

  1. #11
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    Good. Out of interest, which solution did you end up using?

  2. #12
    Join Date
    Apr 2012
    Posts
    63
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Ermm well i found something about a table setting that would get it done, ill try to put the coding in here:
    basically what i did is wrapping the whole website into a table, and the divs that i used i put them into <td> getting this code:
    Code:
    <table id="wrapper" border="0" width="100%" align="center">
    <tr>
    <div>
    <td>
    <div id="header_wrap">
    <div id="header">
    </div>
    </div>
    
    <div id="main_wrap">
    <div id="site_wrap">
    <table width="941" height="402" border="0" align="center">
      <tr>
        <td width="162" background="images/menu_bg.jpg"><iframe name="menu" src="menu.html" frameborder="0" width="162px" height="402px" allowtransparency="true" scrolling="no"></iframe></td>
        <td width="14"></td>
        <td width="751" background="images/content_bg.jpg"><iframe name="content" src="home.html" frameborder="0" width="751px" height="402px" allowtransparency="true" scrolling="auto"></iframe></td>
      </tr>
    </table>
    </div>
    </div>
    </td>
    </div>
    </tr>
    </table>
    This way you can add a style to the table which makes it possible to use a vertical-align command getting this CSS:
    Code:
    html, body, #wrapper {
    	margin:0;
    	padding:0;
    	height:100%;
    	border:none;
    	background:#1c7ac0;
    	text-align:center;
    	}
    	
    #wrapper {
    	margin:0 auto;
    	text-align:left;
    	vertical-align:middle;
    	width:100%;
    	}
    Eventually this was the coding that got me where I wanted to be, and it works perfectly fine, i tested it in both IE and Chrome.

  3. #13
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    Ahh. OK.

    See, what you've done there is inadvertently made your website totally non-SEO compliant. Tables are bad, bad, bad! Maybe in the 90's tables were the cutting edge of web page design but now, for layout purposes, they are considered obsolete and should be avoided at all costs.

    Search Engine Bots cannot see inside table cells and screen readers for blind users mess up big time when they encounter tables. Tables should be used minimally on your site, for displaying data which needs to be in tabular form, they should never be used for the layout and aesthetics of the site.

    I would consider playing around with the functions of CSS3 first. Get rid of the tables and forget about them.

  4. #14
    Join Date
    Mar 2011
    Location
    N 11░ 19' 0.0012 E 142░ 15' 0
    Posts
    1,510
    Thanks
    41
    Thanked 89 Times in 88 Posts
    Blog Entries
    3

    Default

    Quote Originally Posted by ApacheTech View Post
    Search Engine Bots cannot see inside table cells
    Correct me if I'm wrong, but used correctly, they can...
    But yes, tables are terrible in the way of layout.
    Try using <div></div>'s and css instead.

  5. #15
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    SEs can see inside tables. They just rank the content lower because it should be details, not (main) 'content'
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #16
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    Ahh, my mistake. Apologies for that. I've been told that by a few people but I suppose they were paraphrasing.

  7. #17
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    The idea is correct, but the details aren't. SEs can't see everything-- specifically, some elements generated by Javascript (especially Ajax), and content inside Flash. But usually they can read all of the HTML code, but improper coding will make them misinterpret the semantics (meaning) of the page, so this is why using tables for content (or flash, for that matter) is a bad idea. Or images, although I haven't seen anyone using images of text on a site in about 5 years, haha
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #18
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    Using images for text also goes against accessibility and usability guidelines. When designing your site, think what it will look like for all forms of colour blind users, visually impaired users, people who use screen readers (blind users) and the mos debilitating disability of them all, people who still use Internet Explorer. For any of these users, your site will look, act and feel completely different to how you perceive it to be.

    This is especially important for business sites and eCommerce sites. It has been known for companies to be successfully sued by disabled users because it was impossible for them to use the website facilities.

  9. #19
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    It has been known for companies to be successfully sued by disabled users because it was impossible for them to use the website facilities.
    Do you have any information about that? That sounds really weird to me, and I'd be strongly opposed to that. I don't think it's the job of a visual-medium content creator to make it accessible to anyone else, and I think it makes creating a website too potentially dangerous (you can get sued for not making it good enough?). A website is inherently visual, and the only way around it is with special tools-- wouldn't a valid legal excuse be "buy/make better software to read the website"?
    I certainly support doing everything possible to make a site accessible, but legally being at fault for something like that is really extreme, and stupid in my opinion. that's like suing the radio for not letting deaf people listen. It's unfortunate, but inherent.
    Can I sue a painter for not making it accessible to a blind person, or sue a rock-climbing business for not making it accessible to disabled people? That's just taking it too far...

    (Of course if there is ever any intent to make it inaccessible, that's a different issue.)
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. #20
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    I don't have any detailed evidence. It was mentioned as part of our Web Page Design module in uni. It was a ticketing office for a major sporting event that had no method for certain disabled users to buy tickets from their site. There was a class action against the site and they had to pay damages. I'm not sure of anything other than that now I'm afraid.

Bookmarks

Posting Permissions

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