Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Basic formatting HTML question

Reply
Thread Tools

Basic formatting HTML question

 
 
Fred
Guest
Posts: n/a
 
      04-24-2006
Greetings friends and neighbors!

I'm fairly new to HTML and so a pretty basic question....

On a page with all text, when the lines wrap at the right, some words butt
right up to the very edge of the screen. This makes it look like the text
runs off the screen, even though it doesn't.

I think I have seen code that makes the text take up only a certain amount
of the screen -- say 95%. Can someone pls give me a hand on this?

Thanks much!

Fred


 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      04-24-2006
Deciding to do something for the good of humanity, Fred
<(E-Mail Removed)> declared in
alt.html,alt.html.editors.webedit,alt.html.editors :

[alt.html.editors removed as it doesn't exist on my server]
> On a page with all text, when the lines wrap at the right, some words butt
> right up to the very edge of the screen.


Not by default in any graphical browser I know of. All have default
margin and/or padding on html and/or body.

> I think I have seen code that makes the text take up only a certain amount
> of the screen -- say 95%. Can someone pls give me a hand on this?


There are any number of ways, depending on exactly what you want.
Applying a small amount of padding to the text's containing element is
perhaps the simplest.

--
Mark Parnell
My Usenet is improved; yours could be too:
http://blinkynet.net/comp/uip5.html
 
Reply With Quote
 
 
 
 
Jim Moe
Guest
Posts: n/a
 
      04-24-2006
Fred wrote:
>
> I'm fairly new to HTML and so a pretty basic question....
>
> On a page with all text, when the lines wrap at the right, some words butt
> right up to the very edge of the screen. This makes it look like the text
> runs off the screen, even though it doesn't.
>

Have you studied CSS (Cascading Style Sheets) yet? It is a powerful tool
for applying style rules to HTML markup.
In particular what you are looking for are margin or padding properties.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      04-24-2006
Mark Parnell <(E-Mail Removed)> wrote:

> [alt.html.editors removed as it doesn't exist on my server]


Followups trimmed to alt.html. There was no reason to crosspost in the first
place.

>> On a page with all text, when the lines wrap at the right, some words butt
>> right up to the very edge of the screen.

>
> Not by default in any graphical browser I know of. All have default
> margin and/or padding on html and/or body.


My guess is that OP, or the unspecified authoring tool he's using, has put
something on the page that removes those defaults. The most efficient
approach is probably to start over. Trying to fix some markup that was
generated by an authoring tool that does such nasty things, or to fix markup
one has copied from somewhere without understanding it, tends to lead to more
confusion rather than clarity.

Of course, I _could_ be wrong. The OP needs to post the URL (and to specify
the browser(s) in which the problem appears) to demonstrate this.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      04-24-2006
Fred wrote:

> Can someone pls give me a hand on this?


Try the Psychic Hotline.

Otherwise post a URL to the broken page so that we can see it. Can't
fix what we can't see.

 
Reply With Quote
 
cypete
Guest
Posts: n/a
 
      04-24-2006
Hey what if you use paragraphs like this <p>some text here</p> and it
will stretch alright.
Hope this will help you..

 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      04-25-2006
In article <C6Z2g.3401$BO2.1606@trnddc02>,
"Fred" <(E-Mail Removed)> wrote:

> Greetings friends and neighbors!
>
> I'm fairly new to HTML and so a pretty basic question....
>
> On a page with all text, when the lines wrap at the right, some words butt
> right up to the very edge of the screen. This makes it look like the text
> runs off the screen, even though it doesn't.
>
> I think I have seen code that makes the text take up only a certain amount
> of the screen -- say 95%. Can someone pls give me a hand on this?
>
> Thanks much!
>
> Fred


Hi Fred,

In the head of your doc between <head> and </head> put this:

body {padding-right:10px}

and write away...

All the best,

The Nice One

--
dorayme
 
Reply With Quote
 
frederick
Guest
Posts: n/a
 
      04-25-2006
dorayme wrote:
> In the head of your doc between <head> and </head> put this:
>
> body {padding-right:10px}
>
> and write away...


That's nice. A shame that it won't actually do anything useful!

Perhaps you meant the following:

<style type="text/css">
body {padding-right:10px}
</style>

Not "best practice" either, but at least the browser'll do what was
intended!


--
AGw.

 
Reply With Quote
 
dk_sz
Guest
Posts: n/a
 
      04-25-2006
> I think I have seen code that makes the text take up only a certain amount
> of the screen -- say 95%. Can someone pls give me a hand on this?


There are many ways to do so. From using a
centered table using 95% of the width to using CSS.

You could try check: http://www.w3schools.com


--
best regards
Thomas Schulz
http://www.micro-sys.dk/products/sitemap-generator/
http://www.micro-sys.dk/products/website-analyzer/
http://www.micro-sys.dk/products/website-download/


 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      04-26-2006
In article
<(E-Mail Removed) .com>,
"frederick" <(E-Mail Removed)> wrote:

> dorayme wrote:
> > In the head of your doc between <head> and </head> put this:
> >
> > body {padding-right:10px}
> >
> > and write away...

>
> That's nice. A shame that it won't actually do anything useful!
>
> Perhaps you meant the following:
>
> <style type="text/css">
> body {padding-right:10px}
> </style>
>
> Not "best practice" either, but at least the browser'll do what was
> intended!


oops... Yes, I assumed too much...

--
dorayme
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic formatting for HTML in ASP.NET 1.1 ? Jack ASP .Net 2 02-08-2006 08:53 PM
Basic formatting for HTML text in ASP.NET 1.1 ? Jack ASP .Net Web Controls 3 12-28-2005 03:30 PM
Formatting string data : basic question ASP .Net 2 03-22-2005 11:46 PM
Need formatting options menu for formatting hard drive Mark T. Computer Support 3 11-24-2003 11:50 PM
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET Jaime MCSD 2 09-20-2003 05:16 AM



Advertisments