sonesay
Feb 15 2008, 10:35 AM
darran
Feb 15 2008, 10:57 AM
You can always use the following code: CODE div.yourclass {margin: 0 auto 0 auto;} Hope that helped you.
Reply
jlhaslip
Feb 15 2008, 02:29 PM
The above suggestion works to centre a div, but you have been using 'Min-width' which is not universally accepted, and also, you are trying to float:left a centred div, which will not work, either, so adjust the css to give it a width, drop the float, and apply the margin: 0 auto as per below. CODE #header_center { background-image: url('si_07.png'); background-repeat: no-repeat; margin: 0px auto; width: 270px; min-height: 140px; } Tests in FF2 okay, haven't tried IE7 or IE6 yet.
Reply
sonesay
Feb 15 2008, 08:33 PM
You are the man Jlhaslip. I'll test it on other broswers and update this post. works under safari, IE7 and Oprea as well.
Reply
jlhaslip
Feb 15 2008, 10:32 PM
Sonesay, Upload the new css file and then someone else could check this using IE6 and report back here as to whether it centres the Header Image.... thanks.
Reply
sonesay
Feb 15 2008, 11:03 PM
with that current css and html code IE 6 fails. the only thing that will show up is the main tiling background. heres the screenshot I have on my win xp machine running IE 6.
Reply
jlhaslip
Feb 15 2008, 11:50 PM
Try adding text-align: center for IE6's benefit... CODE #header_center { background-image: url('si_07.png'); background-repeat: no-repeat; margin: 0px auto; text-align:center; width: 270px; height: 140px; } and delete the "min-" on the height.
Reply
sonesay
Feb 16 2008, 12:36 AM
QUOTE(sonesay @ Feb 16 2008, 12:03 PM)  with that current css and html code IE 6 fails. the only thing that will show up is the main tiling background. heres the screenshot I have on my win xp machine running IE 6. I've updated that part and removed all other min-width min-height to just height and width, and it seems to show up in IE 6 OK now. I will just change and boot into my windows with IE 7 to double check again. Safari and FF still works. By the way you said earlier you had both IE 6 and IE 7 was that on the same windows or on different installations? thanks again.
Reply
jlhaslip
Feb 16 2008, 01:12 AM
I have both IE6 and IE7 running on Windows XP using this link: http://tredosoft.com/Multiple_IEIE6 will sometimes look okay, but it behaves the same as IE7. Internet Explorer was not designed to allow different versions running on the same machine, so, expect a 'problem' or two with the pages once in a while. It will appear that a page is Okay in IE6, but when a real IE6 Browser finds the page, it will display "normally" (for IE6) and be messed up still, so I do not depend on the IE6 I have installed.  Who does? On the positive side, IE6 is losing it customer base as IE7 and Vista gain strength. And Firefox/Opera, too... Check the Stats over at the w3schools site and see the 10% reduction in IE6 for the last year or so. About 50% of what it was 4 years ago. http://w3schools.com/browsers/browsers_stats.aspOf course, these Stats are skewed by the nature of the people who visit the site. Many 'web-aware' Designers and Coders use alternative, more standard compliant Browsers, so you would expect the numbers to be higher for the non-IE browser because of that. At a Forum I run, the IE Browsers are still at 70+% but the Users are content with what they have. Many Users have the original browsers (IE) they received with the machine. So be it.
Reply
sonesay
Feb 16 2008, 06:57 AM
new css html layout http://sonesay.trap17.com/sonesayi_v2I did the orginal http://sonesay.trap17.com/sonesay with the template css of a 2 column fixed with and tried to work it into a expandable one which I had serious trouble with so I looked on the web and found a 3column expandable one that worked out better for what I wanted to do. It was simple enough too but just took time to rework it all. By the way photoshop slicing does suck alot renaming my slices on adjustments made it a night mare to update on the html. the template for 3 col css expandable content. http://www.sourcedevelop.com/showtutorial.php?id=89can anyone recheck if my new layout displays ok in IE 6/7 my computer is bust again.
Reply
Recent Queries:--
center a div image in css - 29.57 hr back. (1)
-
center image div - 32.73 hr back. (1)
-
div image right - 34.47 hr back. (1)
-
add back background picture to div - 37.98 hr back. (1)
-
centering an image in a div - 54.38 hr back. (1)
-
div image - 55.98 hr back. (1)
-
centering a div background image - 70.73 hr back. (1)
-
center image in div 2008 - 82.19 hr back. (1)
-
div not centering in ie - 92.42 hr back. (1)
-
css center div containing img - 99.83 hr back. (2)
-
centered divs over centered background - 118.55 hr back. (1)
-
center image div ie7 - 121.87 hr back. (1)
-
ie6 centering an image in a div - 128.90 hr back. (1)
-
center image div css - 103.22 hr back. (2)
Similar Topics
Keywords : centering, div, image, logo, centered, aujustable, width, page
- Link Image Css Bug In Firefox
Can anyone help me? (7)
Centering Background Image In Css
(8) Well, the title says what I need. Basically, I want a background image that can be used in the body
or inside a div (or table), which is centered.....
Css Image Position Problem
align image left or right (1) I am having problems figuring out why my image will not align how I want it. Here , you can see
that the image is aligned to the left. This is the code for that block: CODE <a
href="http://img355.imageshack.us/img355/844/r25870774779uu.jpg"><img
src="http://img355.imageshack.us/img355/844/r25870774779uu.th.jpg" alt="bush
bathroom break note" align="left" style="margin-right:
5px;"></a>[text goes here] But if you go here , you can see that the
text does not stay to the right of....
Css Image Replacment
using CSS to change the image path (5) I was wondering if it is possable to change the path to an image using CSS, so that I could provide
a sort of template system rather then having to change a bunch of thing I could have astandard page
and then by changing the external CSS I could change not only styles but the whole image, I soo how
I could change the background-color { url(image.gif)} but whatabout an actual image say change the
src of an img tag?....
Looking for centering, div, image, logo, centered, aujustable, width, page
|
|
Searching Video's for centering, div, image, logo, centered, aujustable, width, page
|
advertisement
|
|