having trouble getting a border where I want it

S

shantip1

When I make a border to put around my title, even though my cursor is
at the beginning of the title, the border winds up the width of the
page. How do I get the border narrowed to only surround my title text?

Thanks!
June
 
T

Thor

You can control the border by setting a margin as follows:

<div style="border-style: solid; margin: 10pt 20%";>

If you set the border from design view, then in code view you'll find the
<div> statement without the margin. The margin parameters shown set the
top/bottom and left/right margins. You're free to use pt, px, in, etc. or
%. You can also control each margin separately: top,right,bottom,left like
so:

....margin: 0.5em 20% 10px 10%

Play with it till you get what you want. Use '%' for the right and left
margins so you don't create a problem for someone with a smaller screen
presentation.
 
M

Murray

You won't see a border until you define style, width, and color, e.g.,

border:1px solid green;

I don't recommend the use of points on the web.
 
S

shantip1

Thor said:
You can control the border by setting a margin as follows:

<div style="border-style: solid; margin: 10pt 20%";>

If you set the border from design view, then in code view you'll find the
<div> statement without the margin. The margin parameters shown set the
top/bottom and left/right margins. You're free to use pt, px, in, etc. or
%. You can also control each margin separately: top,right,bottom,left like
so:

...margin: 0.5em 20% 10px 10%

Play with it till you get what you want. Use '%' for the right and left
margins so you don't create a problem for someone with a smaller screen
presentation.
Thanks, I'll try that.

Regards,
June
 

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

Top