Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

48 users online



Need help with CSS, <div>, and the like

Need help with CSS, <div>, and the like

Currently viewing this thread: 1 (0 members and 1 guests)


Page 3 out of 4
Rad

Rad

thinking of something witty to put here
Status: Offline!

Add "clear: both" to #bottom. Mozilla has a little bug where the container div won't stretch out to a floating element, so we have to put a clear under the floating element.

O_ONanaki

O_ONanaki

I'm a screenwriter. What am I doing here?
Status: Offline!

BrettsEscapture, the original site did use tables, but I re-coded because, apparently, tables are a no-no for layouts. They're supposed to be used for "tabular data" like spreadsheets and calendars. Besides, the layout almost works and I am quite pleased with the workings of CSS.

Scheisse, that works Radley...

Thanks a lot.

___________________

http://nhjm.net/~eleo/~temp/cheneyad2.gif
Dick Cheney Nude -- Sign the Petition!

Rad

Rad

thinking of something witty to put here
Status: Offline!

No prob. Good luck on your site!

BrettsEscapture

BrettsEscapture

yah...
Status: Offline!

Whoever told you that tables work for only tabular data is an ignorant webmaster, or just wants to be lazy...lol

use whatever makes you comfortable, don't worry about what other people think just because you use tables. I use tables all the time, and rarely use div tags on my layouts...some I've had to, but most of the time I don't

Rad

Rad

thinking of something witty to put here
Status: Offline!
Quote:

Originally posted by BrettsEscapture
Whoever told you that tables work for only tabular data is an ignorant webmaster, or just wants to be lazy...lol

use whatever makes you comfortable, don't worry about what other people think just because you use tables. I use tables all the time, and rarely use div tags on my layouts...some I've had to, but most of the time I don't

Tables are not meant to be used for anything other than tubular data. It seems to me that you are the ignorant one. The reason divs seem to hard to work with is that we're all so used to the methodology of tables, where a website is a grid. Also, it seems complicated due to the workarounds needed to compensate mainly for IE. Lets hope IE7 is standards compliant.

Divs also take less coding, saving time and money. How does it save money if you're an individual you ask? Less code equals smaller file size equals less bandwidth load. Shaving a few kb off of your site may not seem like much, but it adds up.

Divs are easier to degrade to smaller screens and devices, gaining more views. Standards and divs also remove the need to make changes to your site just for those 4.0 browsers. The CSS will automatically degrade giving them a basic, but viewable site.

For the graphic designer, you could redesign your whole site without changing a single line of XHTML. CSS and divs let you do that. Or maybe later after the site is up and running you decide you want your middle column 50 pixels wider. 1 change to the CSS file and it's all good. Switching to divs is doing others a favor, and most importantly yourself.

BrettsEscapture

BrettsEscapture

yah...
Status: Offline!
Quote:


Tables are not meant to be used for anything other than tubular data. It seems to me that you are the ignorant one. The reason divs seem to hard to work with is that we're all so used to the methodology of tables, where a website is a grid. Also, it seems complicated due to the workarounds needed to compensate mainly for IE. Lets hope IE7 is standards compliant.

Divs also take less coding, saving time and money. How does it save money if you're an individual you ask? Less code equals smaller file size equals less bandwidth load. Shaving a few kb off of your site may not seem like much, but it adds up.

Divs are easier to degrade to smaller screens and devices, gaining more views. Standards and divs also remove the need to make changes to your site just for those 4.0 browsers. The CSS will automatically degrade giving them a basic, but viewable site.

For the graphic designer, you could redesign your whole site without changing a single line of XHTML. CSS and divs let you do that. Or maybe later after the site is up and running you decide you want your middle column 50 pixels wider. 1 change to the CSS file and it's all good. Switching to divs is doing others a favor, and most importantly yourself.

I'm sorry, it's discussion time...

Firstly...I'll come right out and say this, I've never met a layout I could NOT code using tables. Also, if they are ment for tabulated data, then you can consider a layout, tabulated data. You put information in a table like you do with a layout right? it just has a more complex feel to it with its looks.

Most of all of my layouts in which I make are less than 10 kb...how in the world could it save me money, when it's 4 kbs off...sure you say bandwidth...but the actual websites are not the issue with bandwidth, it's the number of visitors and the image size you use...also take into effect multi-media...that affects bandwidth MUCH more than a simple page does.

Did you say degrading elements? Tables do that as well...you can make a table degrade to a 640x480 browser size, and have it compatible with a 1024x768 resolution. Most of it has to do with CSS and such, but mainly making the width 100%...if it's 100% of the window, then it's going to stretch to the outsides of the window, but if you want it a bit smaller, say making it 80% and centered in the middle...then that will look fine, even on a 640x480 resolution.

I have no problem with people that use div tags...I do what I feel comfortable with, and I would have no problem switching to div tags...I can't knock anyone for making a good site, however I do have a problem with people that TELL others what is right and wrong...I'm not referring to you Raddly, but don't take offense Raddly, we're only having a discussion Smile

Rad

Rad

thinking of something witty to put here
Status: Offline!

:santa_gri
About multimedia effecting bandwidth, that is very true, but we're talking about code.

The number of visitors does affect the 4kb you shave off, multiplying it. Therefore, you save bandwidth.

There is a difference between degrading and shrinking. A div built site has no styling whatsover and is an extremely basic page UNLESS it is accompanied with CSS. You can use the @import technique to hide your styles from less capable browsers, so it doesn't get messed up on NS4 and it doesn't have horizontal scrollbars on a PDA screen.

The thing about tables is that they are fixed, locked grids. The div tag divides up sections into a little floating space, hence the full name divider.

Well, I am telling you to use divs for your designs because it IS wrong.

Quote:

W3C HTML 4.0 Recommendation (http://www.w3.org/TR/REC-html40/struct/tables.html)
Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables.

I too once was an avid table user, but I learned CSS, and it's easy for me to build any layout made with tables. It just takes experience. I bet it was hard for you when you started learning tables too.

Last edited by Rad, December 29th, 2003 02:31 AM (Edited 1 times)

BrettsEscapture

BrettsEscapture

yah...
Status: Offline!
Quote:

Originally posted by Radley
About multimedia effecting bandwidth, that is very true, but we're talking about code.

The number of visitors does affect the 4kb you shave off, multiplying it. Therefore, you save bandwidth.

There is a difference between degrading and shrinking. A div built site has no styling whatsover and is an extremely basic page UNLESS it is accompanied with CSS. You can use the @import technique to hide your styles from less capable browsers, so it doesn't get messed up on NS4 and it doesn't have horizontal scrollbars on a PDA screen.

The thing about tables is that they are fixed, locked grids. The div tag divides up sections into a little floating space, hence the full name divider.

Well, I am telling you to use divs for your designs because it IS wrong.

I too once was an avid table user, but I learned CSS, and it's easy for me to build any layout made with tables. It just takes experience. I bet it was hard for you when you started learning tables too.

I'd first like to add that the quote you included in your post does not apply to me...I use CSS to control my tables and if the content were to so happen to make the user scroll left or right, then I would redesign the code...

I know how to code using div tags, but the thing is, I don't like coding that way...to me, the code looks so unorganized...but that's my preference.

And about the degrading...sorry, I misread what you put down in the first place...my bad...lol

I think that within the next couple of years...I'll probably have to switch to div tags...but since I've been making websites for approximately 8 years...It'll be hard to switch from something I've grown accustomed to...trust me it was no cake walk for me, but to me, making websites shouldn't be a cake walk, because there wouldn't be any accomplishment feel to it anymore. Ya know?

Rad

Rad

thinking of something witty to put here
Status: Offline!

Yeah, it's fun to make websites. I think that divs are more organized. Here's an example for a 3 column layout:

Code:


<div id="wrap">
<div id="logo">
<img src="logo.gif" alt="Exampletastic" />
</div>

<div id="menu">
Lorem ipsum
</div>

<div id="content">
Muspi merol
</div>

<div id="shoutbox">
Ipsum Lorem
</div>

<p id="copyright">
Copyright (c) Examples 2003
</p>
</div>


vs

Code:


<table id="wrap">
<tr>
<td id="logo"><img src="logo.gif" alt="Exampletastic" /></td>
</tr>
<tr>
<td id="midWrapTD>
<table id="midWrapTbl">
<tr>
<td id="nav">
Lorem Ipsum
</td>

<td id="content">
Muspi Merol
</td>

<td id="shoutbox">
Ipsum Lorem
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="copyright">Copyright (c) Examples 2003</td>
</tr>
</table>

Gichin_Funakosh

Gichin_Funakosh

Status: Offline!
Quote:

Mozilla has a little bug where the container div won't stretch out to a floating element, so we have to put a clear under the floating element.

Er... Not quite. Mozilla renders floats correctly; it is actually IE (and other non-compliant browsers) that stretch container divs around floats that are incorrect.

Read: http://www.complexspiral.com/publications/containing-floats/ for an explanation of how floats work and why.

Page 3 out of 4
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0106 seconds.