CSS problem with menu styling

Hello experts.
I have a problem styling my vertical menu.
I want to place bevor the link a bullet.The problem is that if the link text width is bigger than the td width and the text needs to wrap i get the text in the new line in the beginning of the line and not under the first text of the link.
See attached code and screen.
Any help to solve this? screen
<style type="text/css">
.categorylinkrow{ display:block; width:100%}
.categorylinks{ display:inline;}
.categorylinks_bullet_holder{display:inline;}
.categorylinks_holder{ padding-left:0px; display:inline;}
</style>

<table width="100">
<tr><td>
<div class="categorylinkrow">
  <div class="categorylinks_bullet_holder">&middot;</div>
  <div class="categorylinks_holder">
    <a class="categorylinks" href = "#">BlaBlaBlaB laBlaBlaBlaBlaBla
    </a>
  </div>
</div>
<div class="categorylinkrow">
  <div class="categorylinks_bullet_holder">&middot;</div>
   <div class="categorylinks_holder">
    <a class="categorylinks" href = "#">BlaBlaBlaBla BlaBlaBlaBlaBla 
    </a>
  </div>
</div>
</td></tr>
</table>

Open in new window

LVL 2
PanosAsked:
Who is Participating?
 
remorinaCommented:
Hello panosms,
Below is an example of the method I have mentioned.

Cheers
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Test</title>
    <style type="text/css">
        body {font:normal 12px Arial, Helvetica, Serif;}
        .categorylinkrow {display: block;width: 100%;}
        .categorylinks {display: inline;}
        .categorylinks_holder {padding:0 0 5px 15px;background: url( "http://jrobb.mindplex.org/images/black_bullet.gif" ) no-repeat left 3px;}
    </style>
</head>
<body>
    <table width="100">
        <tr>
            <td>
                <div class="categorylinkrow">
                    <div class="categorylinks_holder">
                        <a class="categorylinks" href="#">BlaBlaBlaB laBlaBlaBlaBlaBla</a>
                    </div>
                </div>
                <div class="categorylinkrow">
                    <div class="categorylinks_holder">
                        <a class="categorylinks" href="#">BlaBlaBlaBla BlaBlaBlaBlaBla</a>
                    </div>
                </div>
            </td>
        </tr>
    </table>
</body>
</html>

Open in new window

0
 
Dave BaldwinFixer of ProblemsCommented:
Use 'ul', Unordered List.  It's made to do that.
<table width="100">
<tr><td>
<ul>
    <li><a class="categorylinks" href = "#">BlaBlaBlaB laBlaBlaBlaBlaBla</a></li>
    <li><a class="categorylinks" href = "#">BlaBlaBlaBla BlaBlaBlaBlaBla</a></li>
</ul>
</div>
</td></tr>
</table>

Open in new window

0
 
PanosAuthor Commented:
Hi DaveBaldwin
I need a holder (div-span) to place my custom image (bullet......)
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
remorinaCommented:
You can try the below CSS and see if it works however, the best method I usually use when I need to achieve something similar is by using the bullet image as a background for the div/span and use left padding to accommodate, this makes it a single object and neater code.

<style type="text/css">
.categorylinkrow{ display:block; width:100%;white-space:nowrap;}
.categorylinks{ display:inline;white-space:normal;}
.categorylinks_bullet_holder{display:inline-block;width:10px;vertical-align:top;}
.categorylinks_holder{ padding-left:0px; display:inline-block;width:85px;white-space:nowrap}
</style>

Open in new window

0
 
PanosAuthor Commented:
Hi remorina
Your code is working fine.can you send me a test code for the other method you described
0
 
Dave BaldwinFixer of ProblemsCommented:
You can use your own image.
http://www.w3schools.com/CSS/pr_list-style-image.asp
http://www.mediacollege.com/internet/css/ul-list.html
<style type="text/css">
ul { list-style-image: url("/images/arrow.gif") }
</style>

Open in new window

0
 
PanosAuthor Commented:
Thank you both for your great help.
regards
panos
0
 
Dave BaldwinFixer of ProblemsCommented:
You're welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.