table question

JavaScript and client side scripting.

Moderator: General Moderators

malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

Illusionist wrote:Unipus, i jsut got around to testing the code you showed me. Although, it procudes something like:
  • menu item
  • menu item
blah blah blah

Is there any way, other than using a table, to get the centered-content div, beside the menu items?? Thanks.

edit: nvm forgot about CSS positioning! hehe
im assuming you are after having the list directly below and not padded to the right like normal?

ok, i found this out by accideny many years ago but it still works

Code: Select all

<!-- usually you would use -->
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
<li>item4</li>
</ul>
my hack is to do this

Code: Select all

<li>item1</li>
<li>item2</li>
<li>item3</li>
<li>item4</li>
notice how theres no <ul> tags

i know for a fact this works in IE5.5 and 6, not sure about the other OS's

Hope this is what you were talking about
Mal
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

Please don't do that. For one thing, I don't see what it accomplishes. For another thing, if you're just going to go out of your way to break your code immediately, there's no point in bothering to try to write valid code in the first place.

Secondly, it sounds like he caught what he was missing with CSS positioning... but I would recommend that instead of using positioning, you read up a little on using floats instead. It's much more useful to use floated elements unless you have a fixed-dimension site where you can control the size of all content.

Finally, one little piece of CSS you'll want to know is

Code: Select all

ul &#123; list-style: none; padding: 0; margin: 0; &#125;
That will make your list menus not look like oldschool list menus. Once you've done that (which removes the bullet among other things) you can restyle them to look like whatever you want.
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Yes, Unipus i did find what i needed with CSS positioning. And thanks for hte tip about using floats! I'll lookinto it. Also, thanks for the tip on removing the bullet!!
Post Reply