SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Nov 28, 2004, 23:32 #1
- Join Date
- Oct 2004
- Location
- canada
- Posts
- 157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
css image center prob in firefox etc
hello, heres a nice easy question for ya
.....having problems centering my image on firefox,mac etc....looks fine on IE...i hear thats the prob
body {
font-family: Verdana, Arial, sans-serif;
font-size: 13px;
background-color: #333333;
color: white;
margin: 5;
text-align: center;
}
/* Style for all table cells. */
td {
font-family: Arial, sans-serif;
font-size: 10px;
}
/* Put a border on all generated images */
.image {
border-width: 1;
border-color: #888888;
border-style: solid;
margin-left: 0 auto;
margin-right: 0 auto;
ya i just dont know...cant...look anymore....need rest!
any help appreciated, dank u
-
Nov 29, 2004, 00:48 #2
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
There are a few syntax errors in there. Try this:
Code:.image { display:block; border:1px solid #888; margin-left:auto; margin-right:auto; }
Birnam wood is come to Dunsinane
-
Nov 29, 2004, 12:07 #3
- Join Date
- Oct 2004
- Location
- canada
- Posts
- 157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hey, thx for reply
but still will only work for IE...hmmm, heres the whole code...im stumped
Code:body { font-family: Verdana, Arial, sans-serif; font-size: 13px; background-color: #333333; color: white; margin: 5; text-align: center; } /* Style for all table cells. */ td { font-family: Arial, sans-serif; font-size: 10px; } /* Put a border on all generated images */ .image { display:block; border:1px solid #888; margin-left:auto; margin-right:auto; } .nav { font-weight: bold; font-size: 26px; } /* Align the content of the cells on the index pages to the center. */ #index td { text-align: center; } /* Remove the margin under the images on the index pages. */ #index .image { margin-left: 2; margin-right: 2; margin-bottom: 0; } /* Highlight the image name on the slide pages. */ #slide .name { font-weight: bold; font-size: 14px; } /* Header */ h1 { font-size: 30px; font-weight: bold; } /* Custom link styles */ a:active { text-decoration: none; color: #FFAAAA; } a:visited { text-decoration: none; color: #AAAAAA; } a:hover { text-decoration: underline; color: #FFFFFF } a:link { text-decoration: none; color: #CCCCCC } #imageinfo { visibility: hidden; }
-
Nov 29, 2004, 13:10 #4
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
In the rule for #index .image, you still have horizontal margins without a unit. 2 what?
Are you sure that you assign the class "image" to the images in question?Birnam wood is come to Dunsinane
-
Nov 29, 2004, 16:10 #5
- Join Date
- Oct 2004
- Location
- canada
- Posts
- 157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
awsome! i think i got it....thanks alot man
Bookmarks