PDA

View Full Version : Constrain Browser to size of background image


offtheroad
05-05-2008, 02:52 AM
I have my background image at 770 x 989. I inserted 1 table cell at 100% and imported the background image into it. How do I keep the browser from enlarging bigger than the table cell? I'm using DW CS3 and have Firefox as my main browser. I'm on a mac running Leopard 10.5.2
jbechdel@comcast.net

edbr
05-05-2008, 04:26 AM
do you mean only display 770 pixels wide?

offtheroad
05-05-2008, 04:49 AM
Thats correct. I've been away from DW for a couple years so I need a very good beginners tutorial. I have the Lynda.com Essentials trainning but that may be too advanced for me. You talking to a geezer 60 so I'm a slow learner. Thanks for the speedy reply. It was faster than the Adobe Forum which they still haven't replyed yet.

edbr
05-05-2008, 06:47 AM
well how users see web pages depends on their screen definitions. the best you can do is to centralize your image. i

Ricky55
05-05-2008, 01:17 PM
why did you make your cell 100%? why not just create cell at 770 wide.

Or better still insert the image into a Div and control your image from there.

offtheroad
05-05-2008, 01:36 PM
Thank you. I'll try that. My client just want a 2 page site. It's for a car show. And he loves all ins of fonts, cartoon style> So I decided to build it in Photoshop so I can edit the fonts as he reviews it with me. By the way I need a good beginners DW video tutorial. I have thr Lynda.com esstential trainning. Do you know of any other basic ones? Oh what would be the code for the div tag?

domedia
05-05-2008, 02:06 PM
Oh what would be the code for the div tag? <div style="width: 770px; background: url(directory/image.jpg)">Content</div>

offtheroad
05-05-2008, 03:24 PM
Thank You. Ive decided to run the Lynda.com Essentials CD. What is the advantage of using the div tag? If you don't mind.

Ricky55
05-05-2008, 03:25 PM
Or if you put your CSS in the head it would look like this.

This would also centre it.


<style type="text/css">

#content {
width: 770px;
margin: 50px auto 0 auto;
background: url(folder/image.jpg);
}

</style>
</head>

<body>
<div id="content">Your Content</div>
</body>
</html>

Ricky55
05-05-2008, 03:27 PM
Using the Div tag is how you should be doing this not using tables. Using CSS has many advantages. Usability, easier to maintain, load quicker

domedia
05-05-2008, 03:43 PM
<div> is just a neutral tag you can use to structure your website. And as Ricky said, much more easier to maintain and develop with. Plus you'll get the extra advantages of a web standards website.