将表格布局转换为无表格 [英] Converting tables layout to table-less

查看:87
本文介绍了将表格布局转换为无表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿大家好我正在尝试将使用表格构建的网站转换为使用div标签的网站。并不像我想的那么容易。下面是网站
http://www.jeanneflight.com/JF - CSS布局
http://www.jeanneflight.com/JF/表格 - 表格布局


我的问题与第一个链接有关:

1 Internet Explorer崩溃

2第二个div的背景图像确实显示

3对齐:第一个Div包含3个图像。在css文件中我需要添加border = 0px;否则,顶部的图像将放置在页面的完整右侧,而文本位于完整左侧的横幅下方。第二个div应该在第一个div之下,虽然图像不是一个完整的行。


任何其他有关如何处理此代码的有用的评论将不胜感激。


谢谢,

Shawn

解决方案

HTML / CSS不会导致任何浏览器崩溃。如果IE崩溃了,它就是自己做的。


如果你想声明xhtml,那么你应该使用xhtml而不是旧的,不推荐使用的html形式。所以验证你的html和css是否有错误列表,当我早上醒来时,我可能有时间玩这个。 :)


谢谢,我使用Dreamweaver作为代码编辑器,它通过xhtml自动,我切换到过渡,代码验证。虽然我仍然有图像对齐的错误


我取得了一些进展。


我创建了一个div(class = bg)来保存背景图像。嵌套在里面的是两个div,菜单和内容。我想在div中并排放置它们(class = bg)。相反,他们堆叠在一起。


使用firefox我的背景图像不会出现(在safari中有效)。


另外,我应该使用XHTML,严格还是过渡? Transitional似乎删除了我的错误以进行验证,除了align =""之外,严格删除了大部分错误。属性。我是否应该在专业环境中认识一个?


Hey everybody. I am trying to convert a website that was built using tables into one with using div tags. Not as easy as i thought. Heres the site
http://www.jeanneflight.com/JF -- CSS layout
http://www.jeanneflight.com/JF/tables -- table layout

My problems relating to first link:
1 Internet explorer crashes
2 The background image for the second div does show up
3 Alignment: The First Div contains 3 images. In the css file I needed to add border = 0px; otherwise the image at the top would be placed on the complete right side of the page, and the text underneath the banner on the complete left side. The second div should be beneath the first though the images are not a complete line beneath one another.

Any other helpful comments on how to approach this code would be appreciated.

Thanks,
Shawn

解决方案

HTML/CSS does not make any browser crash. If IE is crashing, it''s doing it on its own.

If you want to declare xhtml then you should use xhtml and not an older, deprecated form of html. So validate your html and css for that list of errors and when I wake up in the morning I might have time to play with this. :)


Thanks, im using dreamweaver as a code editor and it through the xhtml automatically, i switched to transitional and the code is validating. Though i still am having the error with the image alignment


I made a little more progress.

I created a div(class=bg) which holds the background image. Nested inside this are 2 divs, menu and content.I want to have them side by side inside of the div(class=bg). Instead they are stacking above one another.

With firefox my background image does not appear (works in safari).

Also, Should i be using XHTML, Strict, or Transitional? Transitional seemed to removed my errors for validation, and strict removed most except for the align="" attributes. Would i be expected to know one over the other in a professional environment?


这篇关于将表格布局转换为无表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆