Previous Message
Next Message

tables VS divs

Sent by Christian Montoya on 22 September 2005 15:03


If web design was easy, companies wouldn't pay hundreds, even thousands of
dollars for great web sites. CSS is about learning to do it right. I can
assure you that once you learn the techniques of CSS, you'll find it's a lot
faster than designing with tables. You just have to keep working on it.
Sure, you might have to give up on vertically equal height columns, but
that's not as important as you might think.

shlomi, your list was okay at first. You were using a background for the
list seperator, which was the right thing to do. Then you gave up on that
and decided to use an img. That's wrong, and so is the div inside each a
tag. Your markup should be:

<li><a href="#" id="first">ABOUT SUPPLIERS</a></li>
<li><a href="#">SUPPORT</a></li>
<li><a href="#">NEWS</a></li>
<li><a href="#">SITE MAP</a></li>
<li><a href="#">CONTACT</a></li>

Then, your css is:

#navcontainer ul li a
{
padding: 0.2em 1em;
color: White;
text-decoration: none;
line-height:26px;
background: url(images/nav_seperator.gif) center left no-repeat;
}

#first
{
background:none;
}

Also, your ul does not need an id. Think about it, did you use the id
name in your css? no. You used #navcontainer ul.
You used the shortcut, so ul doesn't need an id.


On 9/22/05, shlomi asaf [EMAIL-REMOVED]> wrote:

*hey guys*
> thanks so much for your replies
>
> *cristina*, have u found your css fails? mine never fall down.
> ill read more in details your email, later on- promise :)
>
> *dwain, **cristina, *look at this example, plz enlighten my eyes if im
> doing
> something wrong.
> http://www.shlomiasaf.com/CSS/nav/horizontal_NAV_BAR.htm
> look at the source, it based on eric mayers listematic
> http://css.maxdesign.com.au/listamatic/horizontal04.htm
> using table for this example, i would have done that in no time. i would
> have got vertical-align easly, td-box hieght and it was so easy to acvhive
> that goal in few secs and less code/css
> but here i broke my soul to achive this goal. i had to use 2 styles for
> the
> same nav. i had to define DIV style, and A style. its so complecated for
> no
> reason.
> cheers for any sugestions.
> Shlomi
>
>
> On 9/22/05, dwain alford [EMAIL-REMOVED]> wrote:
> > shlomi asaf wrote:
> > > HI Guys
> > > I'm facing now the dilemma between working with tables or div's
> > > im trying to figure what is the "golden path"
> >
> > in short, tables should be used for tabular data and divs are used as
> > containers for positioning. as you work with (x)html and css rather
> > than tables you will find that this is less code heavy than tables. in
> > the beginning there can be much frustration in positioning elements, but
> > when you begin to understand what you can do with html/css pages, quite
> > frankly, you will not want to go back to using tables for layout.
> >
> > i have been using html/css for layout for just over a year, and i don't
> > think that i could do a table layout if my mother's life depended on it..
> > there is more freedom in using html/css based layout over table layouts..
> >
> > sure, tables are quicker to layout, especially if you are a wysiwyger,
> > but i've been hand coding for just over a year, and i don't even
> > consider wysiwyg as an option any more.
> >
> > there was an advertisement long ago that espoused, "try it you'll like
> > it!" html/css based layouts appear to be more standards compliant than
> > table layouts (imo).
> >
> > hth,
> > dwain
> >
> >
> > --
> > dwain alford
> > [EMAIL-REMOVED]
> > http://www.alforddesigngroup.com
> >
> > The Savior replied;
> > "There is no such thing as sin;..."
> > 'The Gospel of Mary of Magdala'
> >
> =========================================================
> shlomi asaf wrote:
> > I'm facing now the dilemma between working with tables or div's
> > im trying to figure what is the "golden path"
>
> Hi
>
> IMHO it shouldn't be a tables Vs divs argument - because both have their
> place when correctly marked up. It should be a "tables for formatting"
> Vs CSS argument. Plus divs can be just as overused (I'm just as guilty
> of that).
>
> CSS will make your sites much easier to maintain in the future, if they
> are marked up correctly you will still be able to use the site even if
> your stylesheet fails. (Or more to the point your visitor decides they
> want to turn it off, or apply their own styling).
>
> The thing that is important is that you shouldn't force your website to
> be viewed a certain way. Which a table formatted design will try to do
> and will also be more difficult to use on different platforms.
>
> I totally understand what you mean about table formatted design being
> easier to create.
>
> But just try a little test - try navigating around your site using
> nothing but the keyboard, try it on other sites too - ones that are CSS
> driven and ones that are table driven. See how you get on. Now turn
> off the CSS and images - are those sites still usable/accessible? Are
> your sites still usable/accessible? Which in your opinion came out
> best? They might not look as pretty - but when it comes down to it -
> people want to access and use the information.
>
> My 2p
>
> ;o)
>
> hth
> Kristina
> ______________________________________________________________________
> css-discuss [EMAIL-REMOVED]]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org <http://evolt.org> --
> http://www.evolt.org/help_support_evolt/
>
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: