|
Posted by Lauri Raittila on 06/19/05 23:02
in alt.html, Manny wrote:
> Hi,
>
> I am new to dhtml (html+css). I would like to redesign my site using <div>
> tags and styles.
I can see. It would be best to learn some very basics of HTML first. Then
some basics of CSS. Anyway, you should first make your site to have good
HTML, and then apply some CSS to make it look like you want.
> I know how to do it with frames or tables but I did not succed with div's.
Obviously, you learned couble hard ways to do layout. You don't need to,
and it is very hard to think layout before you have any content, when you
make it in proper way.
> In addition, I would like that the site would work for all major browsers
> and platforms, even if javascript is not activated.
> Would someone be so kind to suggest me how to do it ? Here is, with tables,
> the design I need :
>
> <table width="760px" align="center">
Well, that is in CSS terms
body {display:table;margin:auto}
It is good design choise to not specify width. You archieve it in strange
way though. (using wrong value for width)
> <tr><td colspan="2" height="100px">my menu goes here</td></tr>
> <!-- if this top part could be fixed at top of the screen when scrolling, it
> would be nice :-) -->
If you were using table layout, you shouldn't be using it like this...
position:fixed would do fixing thing, but it would only be good in IE, as
it doesn't support it
Good thing you are not doing fixed height design. Nothing this far to be
done.
> <tr><td width="25%" height="100%>several small information text here</td>
What information? Anyway, you need a div, and then you need to float it
left. If you were doing table layout correctly, you would use align=left.
div#left {width:25%;float:left;display;table;}
Dislay:table is there as you don't want your content to get clipped.
> <td width="75%" height="100%>main text here</td></tr>
Nothing need to be done.
> <tr><td colspan="2" height="40px">my navigation goes here (bottom of
> page)</td></tr>
Ok, add clear:left in CSS on element which contains your navigation.
That should be all you need, exept of course the real markup, which you
doesn't seem to have. Make a test page, and come back if it doesn't work.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/buy-opera.html?AID=882173
Navigation:
[Reply to this message]
|