aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes html restriction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "html restriction" Watch "html restriction" New topic
Author

html restriction

Jackie Wang
Ranch Hand

Joined: Apr 18, 2002
Posts: 315
are there a way that we have configure the html code so that it will look the same and print out the same regardless the user change the "text size" in browser? thanks!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61206
    
  66

One way is to use CSS to set the font size. For example:

hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jackie Wang
Ranch Hand

Joined: Apr 18, 2002
Posts: 315
thanks bear,
but where should I put it?
thanks!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61206
    
  66

Ah, never used CSS before? It's a very handy skill to get under your belt.
Easiest way to put it on a page is to place the CSS rule I posted earlier in style tags in the header:

But CSS is most useful when you put the rules in a .css file and use the link tag to include it in a page. That way, your rules are shared across all pages.
hth,
bear
a good CSS reference
recommended reading
Jackie Wang
Ranch Hand

Joined: Apr 18, 2002
Posts: 315
thanks bear,
are there a way that i can change the html code such that the default printing is "landscape" instead of "portrait"? thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html restriction