CSS bolding text problem

D

David Dorward

Joe said:
http://www.wiavic.org.au/test/bold.html

When hovering over the links, why does it "push" the trailing links text
across, once the link turn bold?

Bold text is text with wider strokes. Since the strokes are wider, so are
the letters. Since the letters are wider, they take up more space. So the
anchor takes up more space. So everything after the anchor has to move to
make room for it.
 
J

Joe Blow

David said:
Joe Blow wrote:




Bold text is text with wider strokes. Since the strokes are wider, so are
the letters. Since the letters are wider, they take up more space. So the
anchor takes up more space. So everything after the anchor has to move to
make room for it.
I am trying to eliminate the use of tables, which i have used for the
navigation at wiavic.org.au

Is it possible to define a maximum "cell" width (which is currently
used) for each anchor so that the movement can be eliminated?

Joe
 
M

Mitja Trampus

Joe said:
I am trying to eliminate the use of tables, which i have used for the
navigation at wiavic.org.au

Is it possible to define a maximum "cell" width (which is currently
used) for each anchor so that the movement can be eliminated?

Not directly, because anchors are inline-level elements by
default (i.e., they're part of a line, not a box like e.g. a
paragraph). To specify width, first use display:block to
turn the anchors into blocks/boxes, then e.g. width:10%.

Alternatively, put each "a" into a "li" which is block-level
by default, and specify width for li. In this case (which is
semantically better), you'll have to use float:left and
list-style-type: none on li's so they'll make a horizontal
menu instead of a vertical one.
 

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,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top