navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Centered in IE but not in FF ???

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> Centered in IE but not in FF ???
Page: [1]
 
Rocket Boy

 

Posts: 409
Joined: 12/8/2005
Status: offline

 
Centered in IE but not in FF ??? - 12/23/2005 20:33:39   
It's the thumbnails, Why are images so tricky in CSS? Any advice on how to center these pics properly is much appreciated.

www.rvsp.co.uk/
womble

 

Posts: 5702
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
RE: Centered in IE but not in FF ??? - 12/23/2005 21:04:08   
Put them in a div, define the width and set margin to "auto". That should do it.

_____________________________

~~ "A cruel god ain't no god at all" ~~
~~ Erase hate. Practice love. ~~
:)

(in reply to Rocket Boy)
Giomanach

 

Posts: 6129
Joined: 11/19/2003
From: England
Status: offline

 
RE: Centered in IE but not in FF ??? - 12/24/2005 9:54:16   
Needs to be margin: 0 auto;

:)

_____________________________




(in reply to womble)
Rocket Boy

 

Posts: 409
Joined: 12/8/2005
Status: offline

 
RE: Centered in IE but not in FF ??? - 12/24/2005 10:30:45   
quote:

ORIGINAL: Giomanach

Needs to be margin: 0 auto;

:)


Heeeey.. you might have just solved another problem for me too... If I use this margin command on my page background... Will the background pic stretch all the way to the outsides of the page? At the moment there is about 15-20px white gap around the edge...

Going to go and experiment.... Yay :)

(in reply to Giomanach)
Rocket Boy

 

Posts: 409
Joined: 12/8/2005
Status: offline

 
RE: Centered in IE but not in FF ??? - 12/24/2005 11:41:00   
Ok.. I have put this in the <head> and enclosed all four images in DIV tags but it seems to have created another problem.

For the sake of my visitors I have removed the code but hopefully my explanation will be enough for you to see the problem....

Using the code below seems to center the images but it also makes the entire page align to the right. I have tried altering the float command but with no luck. If you use float: left then the page aligns to that side, float: center doesn't work and if you take the float command out all together the page will stay on the left.

<code><style type="text/css">
div
{
float: right;
margin: 0;
text-align: center;
}
</style></code>


(in reply to Rocket Boy)
Rocket Boy

 

Posts: 409
Joined: 12/8/2005
Status: offline

 
RE: Centered in IE but not in FF ??? - 12/24/2005 11:41:34   
quote:

ORIGINAL: Rocket Boy

Ok.. I have put this in the <head> and enclosed all four images in DIV tags but it seems to have created another problem.

For the sake of my visitors I have removed the code but hopefully my explanation will be enough for you to see the problem....

Using the code below seems to center the images but it also makes the entire page align to the right. I have tried altering the float command but with no luck. If you use float: left then the page aligns to that side, float: center doesn't work and if you take the float command out all together the page will stay on the left.

<style type="text/css">
div
{
float: right;
margin: 0;
text-align: center;
}
</style>





Oh.. by the way... I have been testing this on the thumbnails at www.catsnaps.co.uk and not www.rvsp.co.uk as in the original post, thanks.

(in reply to Rocket Boy)
Rocket Boy

 

Posts: 409
Joined: 12/8/2005
Status: offline

 
RE: Centered in IE but not in FF ??? - 12/24/2005 11:44:25   
quote:

ORIGINAL: Rocket Boy

quote:

ORIGINAL: Rocket Boy

Ok.. I have put this in the <head> and enclosed all four images in DIV tags but it seems to have created another problem.

For the sake of my visitors I have removed the code but hopefully my explanation will be enough for you to see the problem....

Using the code below seems to center the images but it also makes the entire page align to the right. I have tried altering the float command but with no luck. If you use float: left then the page aligns to that side, float: center doesn't work and if you take the float command out all together the page will stay on the left.

<style type="text/css">
div
{
float: right;
margin: 0 auto;
text-align: center;
}
</style>





Oh.. by the way... I have been testing this on the thumbnails at www.catsnaps.co.uk and not www.rvsp.co.uk as in the original post, thanks.

(in reply to Rocket Boy)
Giomanach

 

Posts: 6129
Joined: 11/19/2003
From: England
Status: offline

 
RE: Centered in IE but not in FF ??? - 12/24/2005 11:45:08   
CSS:

<style type="text/css">
body{
margin: 0;
text-align: center;
}

#page{
margin: 0 auto;
text-align: left;
width: 750px;
}

#images{
width: 100%;
text-align: center;
}
</style>


HTML:

<body>
<div id="page">
...insert content here....
<div id="images">
....insert images at bottom of home page here....
</div>
</div>
</body>


_____________________________




(in reply to Rocket Boy)
Rocket Boy

 

Posts: 409
Joined: 12/8/2005
Status: offline

 
RE: Centered in IE but not in FF ??? - 12/24/2005 11:46:50   
OK.. thanks.. that looks usefull...

(in reply to Giomanach)
Giomanach

 

Posts: 6129
Joined: 11/19/2003
From: England
Status: offline

 
RE: Centered in IE but not in FF ??? - 12/24/2005 11:50:30   
The code you created applied the floats etc to all divs, not just the ones for the images. Use the code I have put up there, and it applies classes to the individual div layers, allowing you to modify the individual ones, rather than having all DIVs formatted the same way :)

_____________________________




(in reply to Rocket Boy)
Rocket Boy

 

Posts: 409
Joined: 12/8/2005
Status: offline

 
RE: Centered in IE but not in FF ??? - 12/24/2005 11:52:03   
Yup.. Excellent.. It works perfectly. This is the problem I have been having. All my formating applies itself to all page elements. You have taught me a handy lesson, it's all a lot clearer. Thanks!!!

(in reply to Giomanach)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Centered in IE but not in FF ???
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts