How do I place graphics by CSS and a Class

J

Jorgen

I want to place a graphic in the horizontal center of the page by using a
class “.graphic†from my “body.cssâ€

Then I want to place the graphic with a negative margin during printing by
means of another class “.graphic†from my “print.cssâ€

I have tried to the following:
Style sheet body.css

..graphic{
align:center;
}

and the following code in the webpage

<div class=" graphic ">
<img border="0" src="../images/seats/seats.gif" width="701" height="345">
</div>

But it does not influence the position af the graphic. It is located to the
left margin.
 
J

Jorgen

"Ronx" skrev:
graphic {text-align:center;}

Now it work as expected, but I have still a problem, which I didn’t think of
before.

I want the printing to go more to the left than the margins set in the
printer setup. Printing will be from a MS Browser.

How do I solve this?

Regards
 
R

Ronx

You adjust the browser. There are no CSS or HTML that can adjust the
settings in a browser, and this includes print margins.
 
R

Ronx

Alternative - adjust the print version of the page so that it is less than
620px wide - this will fit between the margins in most browser/printer
set-ups.
 
J

Jorgen

"Ronx" skrev:
Alternative - adjust the print version of the page so that it is less than
620px wide - this will fit between the margins in most browser/printer
set-ups.

I had that bad feeling. It would have been nice to ad a negative margin in
stead of reducing the width of the graphic.
 

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