CSS - Calendar Not Aligning Properly In Ie8
What've I done wrong...? See what's happening with my calendar he
tuirennhurstfield.com/calendartrial.php In IE8 the SUN & MON columns are replacing columns FRI & SAT and are pushing TUES-SAT down a level so they are below... This seems to only be happening in IE8, works fine in IE6, IE7, Safari and Firefox... I purchased this script and the script worked fine in IE8 on the demo (see he codecanyon.net/item/smooth-php-calendar-reloaded/full_screen_preview/105891 ) I've clearly edited something wrong in the CSS when I was making it work with the visual look of my site... But I'm not sure what I'm looking at, and the original developer has given me the sterling advice of "check your css" If you can help at all please let me know! Thanks!!! Similar Tutorialshttp://s125392025.websitehome.co.uk/layout.html I'm making a layout, in this layout(as you can see), I have a SubNav and a main body part. Both of those sections, have a header image and a footer image. Well, my body footer image isn't aligning directly with the main body. It's off by about 1 or 2px. I tried using: position:absolute; With a few different types of top, and bottom, but the picture only dissappears. I used the exact same line code for the footer image for the subnav, and it has aligned just fine. Here's the script if it matters. Could anyone help please? PHP Code: <!DOCTYPE html PUBLIC> <html> <head> <title>2 Box Layout Test</title> <style type="text/css" media="screen"> /* Here is the main CSS */ body { background: #FFFFFF; } div { background: #FFFFFF; } h5 { text-align:center; } #mid, #left { top:120px; } #midcontainer { width:400px; margin:0 auto; position:relative; left:35px; top:44px; } #midheader { background:#000000 url(http://img.photobucket.com/albums/v237/The_Nyne/Site/head400.jpg) top left no-repeat;height:30px;z-index:-1; } #midfoot { background:#000000 url(http://img.photobucket.com/albums/v237/The_Nyne/Site/foot400.jpg) top left no-repeat; height:30px; } #leftheader { background:#000000 url(http://img.photobucket.com/albums/v237/The_Nyne/Site/head200.jpg) top left no-repeat;height:30px; } #leftfoot { background:#000000 url(http://img.photobucket.com/albums/v237/The_Nyne/Site/foot200.jpg) top left no-repeat;height:30px; } #midbody, #topbody, #leftbody { border:1px solid black;background: #a3a3a3; } p.top1 { text-align:center; } p.midheadtxt { font-weight:bold; text-align:center; position: absolute; top:-5px; left:180px; } p.leftheadtxt { font-weight:bold; text-align:center; position: absolute; top:-5px; left:50px; } #leftcontainer { width:200px; position:absolute; left:5px; top:150px; } </style> </head> <body> <!--This is the main site header properties--> <div id="top"> <div id="topbody"> <h5>Main Site Header</h5> <p class="top1">This is where the main image, and TopNav will go.</p> </div> </div> <!--This is where the main body text goes for the page--> <div id="mid"> <div id="midcontainer"> <div id="midheader"> <p class="midheadtxt">News</p> </div> <div id="midbody"> <h5>Middle</h5> <p>This is where the main section of the site is located.</p> </div> <div id="midfoot"> </div> </div> </div> <!--This is the subnav area--> <div id="left"> <div id="leftcontainer"> <div id="leftheader"> <p class="leftheadtxt">Sub-Navigation</p> </div> <div id="leftbody"> <p>This is where the subnav is located.</p> </div> <div id="leftfoot"> </div> </div> </div> </body> </html> I'm trying to recreate a header that was built using tables. Here is an example of the original header. This is how I want it to look using div. http://65.175.116.253/logo/html_head_p1.html Here is the code for the table based header Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> </HEAD> <body bgcolor="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <basefont face="verdana"> <table width="780" height="68" border="0" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#004C91" align="center" valign="center" width="222"><img src="http://65.175.116.253/logo/logo.gif" width="196" height="49" hspace="10"> </td> <td bgcolor="#004C91" align="center" valign="center" width="600"> <img src="http://65.175.116.253/logo/banner.jpg"> </td> </tr> </table> </body> </html> Here is the header using the code with DIVs. http://65.175.116.253/logo/styletest.html Here is the code I have using divs. I'm confused as to how to align the images correctly in the divs... Can someone show me how to correct this? I put the style info in teh same document so it would be easier to read. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <style type="text/css"> #headerlogo { background: #004C91; position: absolute; width: 222px; height: 68px; top: 0px; padding-left: 0px; padding-right: 0px; } #headerbanner { background: #004C91; position: absolute; width: 600px; height: 68px; top: 0px; padding-left: 50px; padding-right: 0px; } </style> <title>Untitled</title> </head> <body> <div id="headerlogo"><img src="http://65.175.116.253/logo/logo.gif"> <div id="headerbanner"><cfinclude template="banner.cfm"> </body> </html> Hi all. I wonder if anybody can point me in the right direction. I want/need to make a calendar that looks very similar to the google calendar's month view. So, basically I need to span multi-day events over the days that they appear (mainly for readability). The calendar reads all the event information from a database, with data entry being on a different part of the site and independent of the actual calendar display. I don't need any fancy drag and drop scripts, or AJAX type things for it either. I just want to know how I can do the same spanning effect as google calendar does. I assume it will only involve html and css (Don't see how javascript would come into the equation) Oh, and if somebody has already posted a solution, i'm sorry for reposting, I'm not really sure what search terms to actually use for this If you know how to do it, or can point me in the correct direction, please do so. Thanks in advance I have two questions related to modification of a Plans Calendar! Are my problems my css modifications or my lack of understanding of perl? I want to make a seven day calendar into a five day calendar, displaying only Mon - Friday. The calendar can be seen at www.doldaycare.com (my kids' daycare center) In plans/theme/style.css, i make my changes like below. The result is great for the change related to Quote: .day.saturday, .day.sunday { display:none; Saturday and Sunday only stop displaying as desired. My problem is that the words Saturday and Sunday still display such that the table cell for Monday has Sunday as a header, Tuesday has Monday as a header, etc. This bring me to changing the other css class (correct term?) related today_names. All of the table cell properties for all days stop displaying when I try: Quote: : /* td.day_names, sunday { display:none; } */ Instead I just want Saturday and Sunday to stop displaying. Is my css incorrect? Here is my css as modified Code: td.day_names { /* used for Sunday, Monday, etc.*/ color:#000; font-weight:bold; font-size:small; font-style:italic; text-align:center; background-color:transparent; border-style:solid; border-width:0px; border-color: #000; margin:0px; width:14%; /* -- modified from orginal 150px --this line makes each calendar cell at least a certain width */ } /* td.day_names, sunday { display:none; } */ .day { /* used for calendar cells*/ background-color:#fff; border:solid 1px #333; padding:0; padding-left:2px; padding-right:2px; width:11%; font-size:small; font-weight:normal; vertical-align:top; height:2px; } /*.day.saturday, .day.sunday { display:none; }*/ I believe that the key part of the perl.cgi related to the html display is: Code: # print day names $return_text .=<<p1; <table class="calendar"> <tr> <td class="day_names">$weekday_sequence[0]</td> <td class="day_names">$weekday_sequence[1]</td> <td class="day_names">$weekday_sequence[2]</td> <td class="day_names">$weekday_sequence[3]</td> <td class="day_names">$weekday_sequence[4]</td> <td class="day_names">$weekday_sequence[5]</td> <td class="day_names">$weekday_sequence[6]</td> </tr> p1 where @weekday_sequence = @day_names; Hi, I need help with formatting a calendar using CSS. Here's a list of the goals I'm trying to achieve: The day numbers are positioned in the top right corner of the cell. The event text is centered both vertically and horizontally within each cell. The day number doesn't affect the centering of the event text (i.e., it's as if it has zero width). I need to be able specify a minimum width and height for the cells. I have a png of the effect I am trying to achieve, but unfortunately I can't post it being a brand-new member. If seeing it would help, let me know and I guess I can PM the url to you. Update: Here's the link to the png: Code: http://tapestryfolkdance.org/images/calendar.png Below is what I've tried. However, the event text is not centered vertically within each cell, and the first couple of events are not centered horizontally in the cell. It is fine if the event text overlaps with the day number. Code: <html><head><style> table { text-align: center; border-style: solid; border-width: medium; border-spacing: 0px } td { border-style: solid; border-width: thin; border-color: black; } .day { margin: 0px; text-align: center; font-style: bold; border-style: solid; border-width: thin; border-spacing: 1px; font-size: large; color: black; float: right; } td { text-align: center; color: black; font-size: small; min-width: 60px; min-height: 120px; vertical-align: top; } </style> </head><body> <table> <tr> <td> <div class=day>2</div>event 1<br></td> <td> <div class=day>3</div>event 1<br>event 2<br>event 3<br></td> <td> <div class=day>4</div>event 1<br></td> <td> <div class=day>5</div>event 1<br>event 2<br>event 3<br></td> <td> <span class=day>6</span>event 1<br>event 2<br>event 3<br></td> <td> <span class=day>7</span>event 1<br>event 2<br></td> <td> <div class=day>8</div>event 1<br></td> </tr> <tr> <td> <div class=day>9</div>event 1<br>event 2<br>event 3<br></td> <td> <div class=day>10</div>event 1<br>event 2<br>event 3<br></td> <td> <div class=day>11</div>event 1<br></td> <td> <div class=day>12</div>event 1<br>event 2<br>event 3<br></td> <td> <div class=day>13</div>event 1<br></td> <td> <div class=day>14</div>event 1<br>event 2<br>event 3<br></td> <td> <div class=day>15</div>event 1<br>event 2<br></td> </tr> </table> </body> </html> Again I have arrived with yet another inquiry regarding tableless layouts. I have been tasked with the creation of a fairly complex calendar application. Creating this using tables would be no problem for me, but I am wondering if this is what I should be doing. I remember hearing that you should only display "tabular data" using tables, which would imply that I should be using divs and the like to create this app, not tables. Does anyone have any resources that specifically tackle the task of creating a calendar using CSS techniques? I feel that I could do it, but I just need a basic approach to get me started. The biggest issue I am having is regarding the days dropping down to a new "row" after seven boxes have been displayed. I can provide no code, obviously, since I haven't started yet. I'm just merely looking for some insight. Thanks in advance! I was wondering how to layout a calendar in CSS. One of the ones you see everywhere, usually done as tabular data that has boxes for each date and are laid out 1 2 3 4 5 6 7 8 9 10 etc etc... I know I've seen it somewhere, but I can't seem to find it anymore. If someone could tell me of a site that has a calendar made using a CSS layout only (No tables), I'd appreciate it. I want to see the code, because I figure it'll be a good lesson in CSS layout. Thanks in advance. I have a style sheet which creates a calendar which is hooked up to a recordset. Like a blog calendar. My problem is on months that seem to have more data then others the calendar table pushes the page or the table therefor creating problems. Here is my CSS, is there a way to lock the table so if data population does occur it doesnt knock everything out of wack? Thanks so much for any help you may offer. Steve /* CSS Document */ table#calendar { font-family:Verdana, Arial, Helvetica, sans-serif; } table#calendar caption { font-size: 10px; font-weight: normal; } table#calendar a { text-decoration:none; } table#calendar tr#days th { font-size: 10px; color: #000000; background-color: #FFFFFF; font-weight: normal; padding: .3em 1px; } table#calendar tr#title th { font-size: 10px; background: White; color: Black; font-size: 10px; border: 0px solid #224; padding-top: 0.3em; padding-left: 0.3px; } table#calendar td { font-size: 10px; width: 30px; color: #000000; text-align: right; border: 0px solid gray; border-color: FFFFFF; vertical-align: top; } table#calendar .day7 { border-right: 0px solid #FFFFFF; } table#calendar td a { font-weight: normal; display: block; margin: 0; padding: 0px; width: 30px; } table#calendar th a { font-weight: normal; } table#calendar a:link {color: 0000CC;} table#calendar a:visited {color: 0000CC;} table#calendar a:hover { background: Silver; } table#calendar .day1, table#calendar .day7 { background: White; } table#calendar .blank { background: White; border: 0px solid #; border-right: 0px solid #99A; } table#calendar .lastweek td { border-bottom: 0px solid #AAB; } table#calendar .today { background-color: #A3AEB0; border: 0px solid black; } please close thread Ok. I've got a calendar all set up, and it displays properly in its frame in Firefox. using firefox, try the following link: http://www.kennedygallery.org (click events calendar) in IE, the whole thing is right-justified or centered or something. Since I discovered the problem, I even started putting redundant declarations in the calendar's style sheet: Code: body { font-family : Verdana, Arial, Helvetica, sans-serif; font-size: 10px; background : #FFFFFF ; color : #505458; margin: 0px; margin-left: 10px !important; width:590px !important; } .maintable { position: absolute; left: 10px !important; margin-top: 0px; margin-bottom: 0px; margin-left:0px; } etc, etc. So is there a positioning bug or something that I have to work around to make it display as it does in Firefox? Thanks, Perry. I am try to make a page that is similar to outlooks calendar page for a day. The page would have a scrollbar that scrolls from 12am to 12am(next day), but the initial position is 8 am instead of 12am. I can set an anchor and make sure the page opens to that anchor, but it is an awkward solution and might cause some linking problems. Anyone know who to do this? Something I think I'm not doing. I'm using something called niftyCorners and thought that was what was cauing the problem, but now I'm not so sure. I am trying to have this appear on a webpage for the reader to use: <script language="JavaScript"> <!-- alert("Sample JavaScript alert box 1."); alert("Sample JavaScript alert box 2"); alert("There you go, alert boxes \nTa da, and one with a new line!"); // --> </script> Now, I need to have the <pre> tag nested inside a div tag, but this doesn't validate. So, I nested the code tag inside the pre tag and it breaks my layout in IE 6.0. Why am I nesting at all? niftyCorners doesn't work very well when you put padding or margin on any div you want to have rounded corners. So, I'm trying to put a div round my pre tag, so I can round the div and I can use the pre tag to control margin/padding. If anyone has any ideas, I'd appreciate it. Hi I have an issue aligning some links. i have it perfect in FF but it is not the same in IE. http://www.sun-awnings-direct.co.uk/the-carino-p-29.html It is the white breadcruumb trail in question. Can anyone advise what IE is doing differently and how I can solve it? Thanks a lot After browsing through w3schools and learning most of what css has to offer I for some reason can't figure out a way to align items using css. I was just wondering if someone could help me with the correct tag. Hi everyone, I am having trouble aligning my content to the edge of the table somehow it shows 20pixels down and I cann't figuere out how to bring it up. Any help will be greatly appreciate. thanks Code: <style> ul { list-style-type: none; margin: 1.0em 0 0 0px; padding: 0; position:relative; overflow: visible; height: auto; text-decoration: none; color: #33FF00;} ul li { text-decoration: none; width: 230px; color: #000; } ul li a, ul li a:visited {height: 1.2em; width: 200px; display: block; text-decoration: none; background: blue; margin: 0.1em 0 0 0; text-indent: 10px; padding: 3px; color: #000;} ul li a:hover { height: 1.2em; display: block; background-color:#FF0000; color: #fff000;} ul li a.currentpage, ul li { height: 1.2em; text-decoration: none; background: #00ffff; padding: 3px; color: #fff;} </style> <table width="234" border="1"> <tr> <td width="230" height="85"> <ul><li><a href="">HOME</a></li> <li><a href="">LINK TWO</a></li> </ul> </td> </tr> <tr><td></td></tr> </table> www.devwebsites.com/index.php is my site. in order to view this problem you must register at www.devwebsites.com/register.php Once you do go back to the home page and you will see the ul out of the login box. Any help is greatly appreciated. Tell me what I should do to fix it please. CSS LINK http://www.devwebsites.com/estilos.css Hi. Any help would be appreciated. I am trying to cut down on my image sizes on my website: http://toptiertemplates.com, but i am having a few difficulties. I have this table which was created in photoshop which is off to the side. I would like to take just a slice of the table and repeat the image the full length of the table's original length. The page is written by placing everything with divs. I know how to set the image as a background and all and repeat it, however, when i do so, it replaces my website's background and just shows up as a white space. So i am wondering if I have to use layers of some sort or anything else. I'd appreciate some help. Thanks. So basically here's the problem.... I'm using a jquery folder tree. By default, there is a plus and minus sign designating expanded or collapsed. If you click the sign only, would the menu expand/collapse. However, for my needs, I need the entire name beside the sign to be clickable as well. So I adjusted certain items and it works... in Opera, Firefox, Safari, Flock, and Chrome... (All latest versions I just downloaded today). It doesn't, however, work in IE6 (yes.. I still use IE6). Have not tested in IE7 or IE8... I posted this in the CSS forum as it seems as though it's a CSS problem as opposed to Javascript or PHP... Anyways... here's the CSS file: Code: .treeview, .treeview ul { padding: 0; margin: 0; list-style: none; } .treeview ul { background-color: white; margin-top: 4px; } .treeview .hitarea { background: url(images/treeview-default.gif) -64px -25px no-repeat; height: 16px; width: 100px; margin-left: -16px; float: left; cursor: pointer; } /* fix for IE6 */ * html .hitarea { display: inline; float:none; } .treeview li { margin: 0; padding: 3px 0pt 3px 16px; } .treeview a.selected { background-color: #eee; } #treecontrol { margin: 1em 0; display: none; } .treeview .hover { color: red; cursor: pointer; } .treeview li { background: url(images/treeview-default-line.gif) 0 0 no-repeat; } .treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; } .treeview .expandable-hitarea { background-position: -80px -3px; } .treeview li.last { background-position: 0 -176px } .treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(images/treeview-default.gif); } .treeview li.lastCollapsable { background-position: 0 -111px } .treeview li.lastExpandable { background-position: -32px -67px } .treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; } .treeview-red li { background-image: url(images/treeview-red-line.gif); } .treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(images/treeview-red.gif); } .treeview-black li { background-image: url(images/treeview-black-line.gif); } .treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(images/treeview-black.gif); } .treeview-gray li { background-image: url(images/treeview-gray-line.gif); } .treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(images/treeview-gray.gif); } .treeview-famfamfam li { background-image: url(images/treeview-famfamfam-line.gif); } .treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(images/treeview-famfamfam.gif); } .filetree li { padding: 3px 0 2px 16px; } .filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; } .filetree span.folder { background: url(images/folder.gif) 0 0 no-repeat; } .filetree li.expandable span.folder { background: url(images/folder-closed.gif) 0 0 no-repeat; } .filetree span.file { background: url(images/file.gif) 0 0 no-repeat; } Here's the relevant nav menu code: Code: if (mysql_num_rows($result) != '0') { while($row = mysql_fetch_array($result)) { $string5= $row['string']; $state3 = $row['state']; $county3 = $row['county']; $city3 = $row['city']; $item3 = $row['item']; if ($state2 != $state3) { if ($i != 1) { $treeview .= "</ul></li></ul></li></ul></li>"; } $i++; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$state3."</a></div><br />"; $state2 = $state3; $j = 1; } if ($county2 != $county3) { if ($j != 1) { $treeview .= "</ul></li></ul></li></ul>"; } $j++; $treeview .= "<ul style=\"display:none;\">"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$county3."</a></div><br />"; $county2 = $county3; } if ($city2 != $city3) { $treeview .= "<ul style=\"display:none;\">"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$city3."</a></div><br />"; $city2 = $city3; $treeview .= "<ul style=\"display:none;\">"; } if ($item3) { $treeview .= "<li>".$item3."</li>"; $item2 = $item3; } } } $treeview .= "</ul></li></ul></li></ul></li></ul>"; There are 3 lines of code that I have changed from when it works: Code: $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$state3."</a></div><br />"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$county3."</a></div><br />"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$city3."</a></div><br />"; From the above 3 lines, the only thing I did which seemed to break the code was move the </div> from in front of <a href ...> to after </a> So the original lines (where it worked) looked like: Code: $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"></div><a href=\"#\" style=\"margin-left:20px;\">".$state3."</a><br />"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"></div><a href=\"#\" style=\"margin-left:20px;\">".$county3."</a><br />"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"></div><a href=\"#\" style=\"margin-left:20px;\">".$city3."</a><br />"; EDIT: Ok... so not everything works in the other browsers either. Basically if I hit refresh with the new code, then collapse and expand seem to work in reverse.... So not sure how to correct this, but any help would be appreciated... Here is what it looks like (Screen shots): Working Properly in FF After a refresh in Firefox (This is after hitting collapse) Working Properly in IE6 (Before making the changes mentioned above) Not Working in IE6 The site is not currently accessible which is why I'm including screen shots. However, if you need to see them, let me know and I will make it live.... Heading out now, so was trying to get a post up at least before I left... Thanks.. if you need further information or additional code, let me know. Any help would, of course, be appreciated. |