border problem

M

Merlin

Hi there,

I am trying to craft a main menu where the background is yellow and there are
white 1px divisions between the menu items. Thats it. Doesn't sound to hard,
does it? Well I cant get it working :-(

Basicly I tried css with a table. The idea was to set the right and left border
to 1px white and to add a margin to each element so the text inside the menu box
has space to breath.

Here is my try:

<style type="text/css">
..two
{
BACKGROUND-COLOR: #F9F729;
COLOR: #1144AA;
border-style: solid;
border-width: 1px;
border-bottom-width: 0px;
border-top-width: 0px;
border-color: #FFFFFF;
MARGIN: 5px 2px 5px 2 px;
}
</style>

<table >
<tr >
<td class="two" >menu 1</td>
<td class="two" >menu 2</td>
<td class="two" >menu 3</td>
</tr>
</table>

Can anybody please give me an advice or a hint on how to do that?

Thank you in advance,

Merlin
 
E

Els

Merlin said:
Hi there,

I am trying to craft a main menu where the background is yellow and there are
white 1px divisions between the menu items. Thats it. Doesn't sound to hard,
does it? Well I cant get it working :-(

Basicly I tried css with a table. The idea was to set the right and left border
to 1px white and to add a margin to each element so the text inside the menu box
has space to breath.

Here is my try:

<style type="text/css">
.two
{
BACKGROUND-COLOR: #F9F729;
COLOR: #1144AA;
border-style: solid;
border-width: 1px;
border-bottom-width: 0px;
border-top-width: 0px;

The above three rules can be replaced by:
border-width: 0 1px;
border-color: #FFFFFF;
MARGIN: 5px 2px 5px 2 px;
}
</style>

<table >
<tr >
<td class="two" >menu 1</td>
<td class="two" >menu 2</td>
<td class="two" >menu 3</td>
</tr>
</table>

Can anybody please give me an advice or a hint on how to do that?

What would help a lot, is if you'd give a URL, or in this case at
least tell us what the current result is. Are there no white lines
between the cells? Or are there white lines with extra space between
the cells?

If all you want is a 1px white vertical line between cells, why are
you setting a margin on the cells? You want the text to have 'space to
breath' within the cell, right? That's done with padding, not margin.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top