Center for all browser settings (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


rtwhite -> Center for all browser settings (9/25/2009 9:53:22)

I have a customer that has made a request for the home page on their new website (that I am supposed to build). They want the banner on the home page to remain centered in the displayed page reguardless of the viewers monitor settings. The example they used to show me what they want is at, http://www.indianapia.com/ The webpage that I am building is at http://www.rtwhitewebs.com/piaofnc/index.htm
Would you please take a look and if you can, give me some instructions about how to make this work?
[:o]




Tailslide -> RE: Center for all browser settings (9/25/2009 9:56:45)

Sure - just add the banner image to a div and centre that div using margin:0 auto in your stylesheet. You can infact just make the image display:block and centre that the same way BUT since you probably want the rest of the site centred under the banner image it's easier to centre the whole div that everything sits in instead.




rtwhite -> RE: Center for all browser settings (9/25/2009 10:05:02)

I appreciate your response. But now I feel like a real dummy. (may be because I am....) I have never used a style sheet and will have to lookup what a DIV is. I won't keep you busy answering my dumb questions. I will take the information you offered and go look it up.

Thanks again..[:)]




d a v e -> RE: Center for all browser settings (9/25/2009 10:43:28)

incidentally your statemap_small.jpg should be saved as/exported from the original as a gif ;)




rtwhite -> RE: Center for all browser settings (9/25/2009 10:49:34)

Why Dave? (Something else I don't know... gosh I am embarrased about being so dumb)




d a v e -> RE: Center for all browser settings (9/25/2009 10:59:55)

jpeg works by discarding some information from an image - usually ones with thousands or more colours and subtle gradations between - basically photos, where you notice very little degradation in quality.

gifs are far more suited to images with relatively few colours (clipart, maps, anything that isn't photographic or with lots of gradients/comlicated drop shadows). gifs work by often reducing the number of colours (though not always) and when there are consecutive pixels in a row - using a kind of shorthand to say not 'one grey pixel, another grey pixel, another grey pixel... ' but '50 grey pixels in a row'.


using jpegs for image like clipart/your map results in a higher filesize, text that isn't as crisp and poor rendering of solid colour areas (e.g. the red in the P and A that looks smudged or dirty.

it's not a big thing really in this case but it's worth remembering the general rule of thumb 'jpegs for photos and gifs for everything else' ;) (i'm leaving pngs out of it for now :) )




womble -> RE: Center for all browser settings (9/25/2009 16:39:53)

Aw, go on Dave, tell us about pngs!.....Pleeeeeeassseeee! [:D] [sm=lol.gif]

PNGs (Portable Network Graphics) - like jpegs, best used for photographic images and complex images with lots of variations of colour. What's the difference between JPEG and PNG? (avoiding the highly technical explanation) like JPEGs, PNGs are a compressed image format, but unlike JPEGs they're "lossless," so you don't lose any data - it's just encoded in a more efficient way (don't ask me to explain that, because last time I had to do that was for a university assignment, and I almost lost the will to live half way through [:D]). With JPEGs, if they're compressed too much, images can get a little smudgy (not a technical term [:D]) and you can get stray pixels cropping up in unwanted places.

The main advantage of PNGs over the JPEG format is that unlike JPEGs, which don't support transparency, the PNG format does support transparency, and also partial transparency. With GIF images you're limited to a maximum of 256 colours in each image (hence they're not much use for photos), whereas with JPEG and PNG, both support up to 16 million colours, so allow a lot more sutble shading and variations in colour. A PNG image can be 10 to 30% more compressed than a GIF image, but images compressed with PNG don't compress as much as JPEGs do.

PNGs are perfect really for photographic images where you also need areas of transparency, but they can also be useful for images with fewer colours, images that in years gone by would have probably usesd the GIF format. As an example, a site I'm currently working on has an image map, and the map has quite a few icons on it. I've attached an image with three versions of the same icon. All started out as a PNG image. On the left is the icon saved as a GIF and you can see the shading around the base of the rose, which is partially transparent in the orginal image, has disappeared (GIF doesn't support partial transparency). The middle image is the icon saved as a JPEG, and if you look closely you'll see areas of pixellation on both the the shading at the base of the stem, and on the petals of the rose. The original PNG image is on the right.

[image]local://upfiles/14943/7681BAA2905B4C6DA2C7B6DC7AE2035E.jpg[/image]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.09375