|
| |
|
|
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/
|
|
|
|
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; :)
_____________________________
|
|
|
|
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>
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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>
_____________________________
|
|
|
|
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...
|
|
|
|
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 :)
_____________________________
|
|
|
|
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!!!
|
|
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
|
|
|