Forum Moderators: open

Message Too Old, No Replies

How to use <ul> tag within a table

         

Juin

4:28 pm on Aug 14, 2010 (gmt 0)

10+ Year Member



Hi,

Using suggested code below from user grahamstewart works to displaying all items in a single row (thanks!)

But, it stops working if I put the same code with ul#menu {} and ul#menu li {} in Style.css, and use <ul id="menu"> ... </ul>.

Could any of the gurus help me? Thanks.

ul {
display: inline;
margin: 0;
padding: 0;
}
li {
display: inline;
padding: 0 0.5em;
border-left: 1px solid #000;
}

[webmasterworld.com...]

tedster

5:36 pm on Aug 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello Juin, and welcome to the forums.

The subject line for this thread says "within a table tag". How does a table enter into the picture for you? I don't see any table tags in the mark-up you supplied, so we probably need a bit more HTML and CSS to understand what your wresting with.

Juin

7:32 pm on Aug 14, 2010 (gmt 0)

10+ Year Member



Hi Ted, Thanks for your reply.

You are right. I'd like to change the Subject line if possible.

I was having trouble using ul in as well as outside a table at first (still may post a question after current issues is resolved). I then removed the table completely.

I am trying to put the following menu items in a single row on my blog (Wordpress 3.0.1, they are displayed in three rows if using <ul id="menu"> ... </ul>. But all items are on a single row if just using <ul>....</ul>.

Home
About Test page 1
Stars Archives Contact Author

Juin

8:27 pm on Aug 14, 2010 (gmt 0)

10+ Year Member



I think that I've resolved my issue by using div tag outside of ul tag.

<div id="menu">

<ul>
</ul>

</div>

Thanks.

tedster

9:31 pm on Aug 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It sounds to me like you might be wrestling with "specificity" and may want to do some reading about the topic. Here's a good start: CSS Specificity [webmasterworld.com]