CSS - Spacing Issues When Page Breaks
Hello! When the content of my website expands to include scroll bars, a 1px bar of white becomes visible on the right side of my content. I'm aware that the white is from my bg, but I don't know why everything gets off-set.
Also, in IE7 there is a strange spacing issue between my header and the navigation, although it is not evident in other browsers. This is currently visible: http://www.caseit.org/test My content: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="reset.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="header"> <img src="header.jpg" width="1000" height="140" /> </div> <div id="navigation"> <ul id="qm0" class="qmmc"> <li><a href="javascript:void(0)">Home</a></li> <li><a class="qmparent" href="javascript:void(0)">About CaseIT</a> <ul> <li><a href="javascript:void(0)">Overview</a></li> <li><a href="javascript:void(0)">History</a></li> <li><a href="javascript:void(0);">Previous Competitors</a></li> </ul> </li> <li><a href="javascript:void(0)">About SFU Business</a></li> <li><a href="javascript:void(0)">Why Compete?</a></li> <li><a class="qmparent" href="javascript:void(0);">CaseIT 2010</a> <ul> <li><a href="javascript:void(0);">Organizing Committee</a></li> <li><a href="javascript:void(0);">Timeline</a></li> <li><a href="javascript:void(0);">Competition Information</a></li> <li><a href="javascript:void(0);">Venues</a></li> </ul> </li> <li><a href="javascript:void(0);">Sponsors</a></li> <li><a href="javascript:void(0);">Media</a></li> <li><a href="javascript:void(0);">Contact Us</a></li> <li class="qmclear"> </li> </ul> </div> <div id="image"> <img src="image1.jpg" width="900" height="233" /> </div> <div id="container"> <div id="content"> hhqrqrqr<br />erereqrqw<br /> hhqrqrqr<br />erereqrqw<br /> hhqrqrqr<br />erereqrqw<br /> hhqrqrqr<br />erereqrqw<br /> hhqrqrqr<br />erereqrqw<br /> hhqrqrqr<br />erereqrqw<br /> hhqrqrqr<br />erereqrqw<br /> </div> <div id="sidebar"> we </div> <div id="sponsors"> </div> </div> </body> </html> My CSS (only the relevant stuff): Code: @charset "UTF-8"; /* CSS Document */ body { background-color: #EEEEEE; background-image:url(bg.jpg); background-position: top center; background-repeat:repeat-y; } #header { width: 1000px; margin-left: auto; margin-right: auto; } #navigation { width: 1000px; height: 35px; background-image:url(linkbg.jpg); margin-left: auto; margin-right: auto; } #image { width: 900px; height: 233px; margin-left: auto; margin-right: auto; } #container { width: 900px; margin-left: auto; margin-right: auto; background-color:#33FF33; height: 100%; } #content { float: left; width: 645px; } #sidebar { background-image: url(sidebarbg.jpg); background-repeat: no-repeat; background-color: #999999; float: left; width: 255px; } #sponsors { float: left; width: 900px; height: 200px; } Additional notes: I use the Meyer reset unedited from his website. Thank you! Similar Tutorialsas is common with divs is the auto return at the bottom of them... i have this CSS page... http://defunctgames.com/helpfix/page1.htm the only problem with it is the space underneath "All Websites: Reviewed!" here is the original HTML version of this section.. http://defunctgames.com/helpfix/page2.htm can you please help me get the same exact result as the HTML version thanks. In both Firefox and IE some of the larger advertisements at the top overlap the content. In IE only, the margin on the bottom of the page does not show up at all. The website is http://www.socialplay.com. Please provide help if you know what's wrong. Thanks. Hi. I'm trying to update a site to use CSS instead of tables and I'm having some issues with the top banner and the lovely IEs. Basically, IE6 seems to be acknowledging some padding/margins for my "banner" div and both IE6 and 7 have some extra spacing below my H1/logo image that Firefox/Opera properly display. I put up a screen shot of Firefox (far left), IE7 (middle), and IE6 (upper right) showing the discrepancies at "hxxp://ns1.zivix.com/~mbydalek/sample/Screenshot.png" Here are the specific problems that I am trying to fix: 1) The floated H1 (background green) should have 0 spacing at the bottom, yet IE6/7 both show some extra green indicating some extra spacing 2) IE6 has the banner a few pixels off to the right and actually a couple pixels taller than it's supposed to be, which is the height of the floated right image. I put the code and css up at: hxxp://ns1.zivix.com/~mbydalek/sample/admin.html hxxp://ns1.zivix.com/~mbydalek/sample/css/master.css Any help would be greatly appreciated! Regards, Mike * On a side note, how the heck do you post URLs (with or without bbcode) on these forums? Any url I try (even if I copy/paste directly from the help) gets replaced with a "(URL address blocked: See forum rules)" Well, I don't see anything in the rules and I've read/searched through them now for 20 mins and am not having any luck. Hey, I've been slowly trying to learn CSS and was very pleased with myself for making this website with Divs. But now IE7 just gave me the finger. I have some major major spacing issues with my #maincontentLeft and #maincontentRight divs. I have read a little bit about all the crazy stupid bugs in IE6 and IE7 (like double spacing margins..ect) but don't really know hwo to fix... or if thats my problem. ??? Here is my site u rl: ptk.org/scholarships/franklanza/ (i'm new so i can't link it in the text field but just add the w's ) Any help would be SO much appreciated!! -Sarah Page: http://www.sdtars.com/development/join/ In Mozilla the spacing looks perfect, however, in IE the spacing is HUGE. Here is the associated CSS: Code: fieldset p{ clear: both; float: left; margin: 0; padding: 5px 0 8px 0; padding-left: 210px; height: 1%; } fieldset label { font-weight: bold; float: left; margin-left: -210px; width: 200px; } fieldset input.form { width: 200px } Any ideas how to get them to be the same, across all browsers? On my new design: http://codymays.net/~private_ftp/theed The header and footer of the green block have a space on them and I cannot figure out why. I had this problem with the design before, but I started over and now I only have this issue with IE6 and below. It works in all other browsers. I can clear the spaces if I set the margin-top of the block's content area to -4 and the footer's margin-top to -4. But once this is done, IE then redraws the div at the bottom of the page for no apparent reason. Any ideas/suggestions on what to do here would be appreciated. Thanks, Cody Hi: I have a MySQL/PHP generated form letter which gets printed and mailed. I have extablished a CSS font (class?) with a "page-break after" parameter as shown he PHP Code: h4 { font-family: Arial, Sans-serif; font-size: 14px; font-weight: 500; text-align: left; page-break-after: always;} This works great on a PC running IE. However, On a Mac, running OSX, the page breaks are entirely ignored and it is printed as a single long page. I have tried using other Browsers (Opera, Netscape, and Safari) and they all heve the same problem. Does anyone have a suggestion? Thanks Sean Ok people, I have a page that contains 2 tables, one beneath the other... The table at the top can vary in height, but the table at the bottom is of fixed height... What I want to do is put some sort of "page break" in, so that the second table is always printed on a second piece of paper... Any ideas anyone? Hi People... Not sure if the is in the right forum!? Basically i have a page that is only ever going to be displayed in IE (using the webbrowser control within a programme). On this page i would like to use 'page-break-after: avoid' but as this is not implemented i am try to go about it differently. Is it possible to do something along the lines of this... Quote: <div style="page-break-after: expression(are we in the bottom eigth of the page?'always':'auto')"> Can this work, oh and i also need help with the bit in bold and italics. Many Thanks! Hi, I'm having some problems printing a html document. I have a print.css file that formats my page. I've set up a class for inserting page breaks where I need them. But for some reason it doesn't work. Also it's doing a strange page break at the beginning of my html document when it's printed. For some reason I can't add a link to my posts, so here's the url minus the www's and the dot. jfmackie.com/About_Us/our_team_Sales_copy.html Please help! Thanks sskully Hello, I have a page with a large table. The problem is that when you print the page, the browser will add a page break in the middle of a row. I would like to force no-page-breaks for each row, so when you print, it will never print half a row on one page and the other half on the next page. I am assuming css can do this, but I have no idea where to start. I can look up the specifics, can someone just point me in the right direction? It is possible (although support seems sketchy) to prevent tables from breaking: Quote: table {page-break-inside: avoid;} BUT... the css definitions don't seem to apply to non-block-elements (such as tr and th). Although the CSS validator does not seem to complain, most browsers don't seem to support it. This feature seems to important to have been neglected by WC3, so what am I missing? My final option (and I shutter to think about it) is to place a non-breaking table inside each row. That seems (to me) very silly, but perhaps it is a way around the problem. It has an additional problem that the td breaks won't line up. The table won't lok much like a table anymore. I am looking for a much happier solution. Thanks Hi all, I'm fairly new to CSS and this is one of my first attempts at a somewhat complicated layout. The page looks OK in FF, IE 7, Safari, and Opera, but if I zoom in or out while in FF or IE, it breaks the layout by increasing the width between some of the cube divs. Is there any way to fix this? Link: http://universalcorner.com/testsite/ Stylesheet: Code: body { font-family: Arial, "MS Trebuchet", sans-serif; } #maincontainer { width: 966px; height: 748px; border: 12px solid #000027; margin: 0 auto; padding: 0; } #header { border-bottom: 12px solid #000027; height: 140px; z-index: 100; } #logo { background: #fff; width: 480px; height: 100%; border-right: 12px solid #000027; display: inline; float: left; vertical-align: top; } #logo p { /* functions as image container */ position: relative; top: 20px; } #slogan { position: relative; background: #78C0FF; width: 292px; height: 100%; border-right: 12px solid #000027; display: inline; float: left; vertical-align: top; padding: 0 10px 10px 10px; z-index: -100; zoom: 1; } #consultants { position: relative; background: red; left: 6px; width: 150px; /* width: 150px; */ height: 100%; display: inline; float: left; text-align: center; margin: 0; padding: 0; z-index: -100; } ul.nav { /* navigation bar */ position: relative; float: left; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 1em; width: 126px; height: 586px; background: #4486C4; padding: 0 10px 10px 20px; margin: 0 0 10px 0; border: solid #000027; border-width: 0 12px 0 0; list-style: none; } ul.nav a { text-decoration:none; color:#000; } ul.nav a:hover { color:#fff; } ul.nav li { /* all list items */ padding: 16px 0 0 0; list-style: none; } ul.squares { list-style: none; padding: 0; margin: 0; } ul.squares li { position: none; background: #000; width: 150px; height:140px; padding: 0; margin: 0; border: solid #000027; border-width: 0 12px 12px 0; display: inline; float: left; } ul.squares li.end { border-right-width: 0; } ul.squares li.bottom { border-bottom-width: 0; } #textbox { width: 636px; height: 292px; float: left; display: block; border: solid #000027; border-width: 0 12px 12px 0; background: #C1BDFF; margin: 0; padding: 0; } #textbox p { margin: 10px; } div.cube { width: 150px; height: 140px; border: solid #000027; margin: 0; padding: 0; } #consultation { color: #fff; font-size: 1em; font-weight: bold; position: relative; display: inline; float: left; width: 302px; height: 130px; border: solid #000027; border-width: 0 12px 0 0; background: #001E8A; padding: 10px 0 0 10px; margin: 0; } HTML: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Company Name, Inc.</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="maincontainer"> <div id="header"> <div id="logo"> <p align="center"><img src="images/logo.gif" alt="Company Name, Inc."></p> </div> <div id="slogan"> <p><span style="font-size:.85em">Company Name, Inc.<br> Anytown, US<br> <a href="mailto:info@companyname.com">info@companyname.com</a><br> 555-555-5555</span><br> <span style="font-size: 1.1em; font-weight:bold">Tagline Goes Here</span></p> </div> <div class="cube" style="float: left; border-width: 0 0 0 0"> <p align="center"><img src="images/image.gif" alt="Placeholder Image"></p> </div> </div> <ul class="nav"> <li><a href="index.php">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Services</a></li> <li><a href="#">Plans & Pricing</a></li> <li><a href="#">Our Clients</a></li> <li><a href="#">Press Room</a></li> <li><a href="#">Blog</a></li> <li><a href="#">Contact Us</a></li> </ul> <div style="background: #001E8A; display:inline; float: left; border-width: 0 12px 12px 0" class="cube"></div> <div style="display:inline; float: left; border-width: 0 12px 12px 0" class="cube"></div> <div style="background: #002455; display:inline; float: left; border-width: 0 12px 12px 0" class="cube"></div> <div style="display:inline; float: left; border-width: 0 12px 12px 0" class="cube"></div> <div style="background: #4486C4; display:inline; float: left; border-width: 0 0 12px 0" class="cube"></div> <div id="textbox"> <div style="background: #002455; position: relative; float: right; top: 130px; border-width: 12px 0 0 12px; margin-top: 10px; margin-left: 10px" class="cube"></div> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi sapien urna, scelerisque nec, imperdiet vitae, luctus non, nisi. Duis et magna et tellus imperdiet tempor. Sed ipsum.</p></div> <div style="background: #002455; position: relative; top: 0; left: 0; display: inline; float: right; border-width: 0 0 12px 0" class="cube"></div> <div style="position: relative; top: 0; left: 0; display: block; float: right; border-width: 0 0 12px 0" class="cube"></div> <div style="position: relative; top: 0; left: 0; display: inline; float: left; border-width: 0 12px 0 0" class="cube"></div> <div style="background: #002455; position: relative; top: 0; left: 0; display: inline; float: left; border-width: 0 12px 0 0" class="cube"></div> <div id="consultation">Click here to get your FREE ONSITE CONSULTATION from Company Name</div> <div style="background: #78C0FF; position: relative; top: 0; left: 0; display: inline; float: left; border-width: 0 0 0 0" class="cube"></div> </div> </body> </html> Any suggestions would be much appreciated. Hi all I am using a style sheet with the print media type to controll how my site looks when it is printed out. It works very well the only problem being that I have <div>s which make boxes for the content and I would like for the boxes to not get split upon diffrent pages. Idealy I would like to make it so that if the the <div> is going to split over two pages it just gets put at the start of the next page. This probaly isn't possiable but you never know. Any Ideas would be helpfull Nick Carlevaris I am having issues with my index page not showing correctly in IE. It works properly in all other browsers I have tested. Below the banner area the register, login, and members areas should go across the page but in IE they go down the page as if there is only one column. I need them to go across the page as they do in all other browsers. Any help would be greatly appreciated. Below is the CSS code and HTML code. The site this is for is www.mycookfamily.info. CSS Code: Code: * { padding: 0; margin: 0; outline: 0; } body { font-size: 12px; font-family: Arial, "Trebuchet MS", sans-serif; color:#565656; background:#212121; left bottom repeat-x; } .index_box { margin:0 0 20px 0; background: #E1F7FA; padding:0 0 5px 0; -webkit-border-radius: 8px; -moz-border-radius: 8px; } a { color: #565656; text-decoration: underline; } a:hover { text-decoration:none ; } .cl, .clear { display: block; height: 0; font-size: 0; line-height: 0; text-indent: -4000px; clear: both; } .shell { width:960px; margin:0 auto; position:relative; } h2 { padding-bottom:4px; background:url(images/h2.gif) left bottom repeat-x; margin-bottom:9px; font-family: "Trebuchet MS", Arial, Sans-Serif; font-size:27px; color:#272728; } h3 { color:#fff; font-size:20px; padding-bottom:10px; } h5 { font-size:10px; color:#4062b7; font-weight:normal; padding-bottom:2px; } h5 a { color:#4062b7; text-decoration:none; } h5 a:hover { color:#4062b7; text-decoration:underline; } .button { font-size:11px; color:#2a2b22; font-weight:bold; text-decoration:none; } .button span { font-size:11px; color:#2a2b22; font-weight:bold; cursor:pointer; } /* Header */ #header { background:url(images/header.jpg) left top repeat-x; height:75px; } #logo { float:left; width:201px; height:75px; text-align:left; } #logo a { float:left; width:201px; height:75px; font-size:0; line-height:0; text-indent:-4000px; background:url(images/logo.png); } /* Navigation */ #navigation { float:right; padding-top:5px; background:url(images/navigation-separator.jpg) right 1px no-repeat; } #navigation ul { list-style:none; padding-right:1px; } #navigation ul li { float:left; padding-left:1px; background:url(images/navigation-separator.jpg) left 1px no-repeat; } #navigation ul li a { float:left; padding:0 16px 0 15px; height:64px; line-height:64px; font-weight:bold; font-size:13px; color:#272727; text-decoration:none; } /* #navigation ul li a:hover, */ #navigation ul li a.active { background:url(images/navigation-active.gif); color:#fff; } #navigation ul li a span { float:left; } /* Intro */ #intro { background:url(images/intro.gif) left top repeat-x; height:418px; padding-top:22px; } #intro .slider-holder { width:960px; height:353px; position:relative; overflow:hidden; } #intro .slider-holder ul, .jcarousel-clip { list-style:none; width:960px; height:353px; position:relative; overflow:hidden; } #intro .slider-holder ul li { float:left; position:relative; width:960px; height:353px; list-style:none; } #intro .slider-holder .offer-image { position:absolute; top:0; left:0; } #intro .slider-holder .offer-image img { border:1px solid #a7a0a0; } #intro .slider-holder .offer-data { position:absolute; top:1px; right:1px; height:317px; width:230px; background:url(images/semi-transparent.png); padding:34px 20px 0 25px; } #intro .slider-holder .offer-data .entry { height:212px;} #intro .slider-holder .offer-data p { color:#FFF; font-weight: bold; line-height:18px; padding-bottom:18px; text-align:justify; } #intro .slider-holder .offer-data p a { color:#C90; font-weight: bold; } #intro .slider-holder .offer-data .buttons { padding-right:4px; } #intro .slider-holder .offer-data .buttons .button, #intro .slider-holder .offer-data .buttons .button span { height:29px; line-height:29px; float:left; } #intro .slider-holder .offer-data .buttons .button { float:right; background:url(images/intro-button.jpg) left top repeat-x; border:1px solid #434340; padding:0 8px; } #intro .slider-holder .offer-data .buttons .button span { background:url(images/intro-button-span.jpg) left top no-repeat; padding-left:7px; } #intro .slider-navigation { height:24px; background:url(images/intro-shadow.jpg) left top no-repeat; padding-top:36px; } #intro .slider-navigation ul { list-style:none; margin-left:420px; } #intro .slider-navigation ul li { float:left; } #intro .slider-navigation ul li a { background:url(images/slider-navigation-normal.jpg); width:19px; height:20px; display:block; font-size:0; line-height:0; text-indent:-4000px; text-decoration:none; } #intro .slider-navigation ul li a.active, #intro .slider-navigation ul li a:hover { background:url(images/slider-navigation-active.jpg); } /* Main */ #main { background:#f8f8f8 url(images/main.jpg) left top repeat-x; } #main .shell { width: 900px; margin-left:auto; margin-right:auto; padding:25px 0; } #main p { padding-bottom:10px; line-height:17px; } .box-first { float:left; width:250px; padding:0 19px 0 0; } .box-center { float:left; width:250px; padding:0 19px 0 0; } .last-box { float:left; width:300px; padding:0 19px 0 0; } .box .entry { height:217px; padding-left:2px; } .box .big-image { padding:4px 0 10px 0; } .box .big-image img { border:2px solid #fff; } .box .buttons .button, .box .buttons .button span { background:url(images/main-button.jpg) repeat-x; height:29px; line-height:29px; float:right; display:inline; border:1px solid #bfbebe; padding:0 8px; } .box .buttons .button span { float:left; border:0; background:url(images/main-button-span.jpg) left top no-repeat; padding:0 0 0 7px; } #main .news { } #main .news ul { list-style:none; } #main .news ul li { border-bottom:1px dotted #e8d0d2; padding-bottom:7px; margin-bottom:15px; } #main .news ul li.last { border-bottom:0; padding-bottom:0; margin-bottom:0; } #main .news ul li .post-image { float:left; width:76px; padding:3px 22px 0 0; } #main .news ul li .post-image img { border:2px solid #fff; } #main .news ul li .post-data { float:left; width:203px; } #main .news ul li .post-data p { color:#413f3f; line-height:18px; padding-bottom:0; } #main .news ul li .post-data a { color:#4062b7; } .bullet-list ul { list-style:none; padding-top:1px; } .bullet-list ul li { line-height:12px; background:url(images/ul-bullet.gif) left 5px no-repeat; padding:0 0 14px 10px; } .bullet-list ul li a { color:#4062b7; } /* Footer */ #footer { background:url(images/footer.jpg) left top repeat-x; color:#b3adad; padding:24px 4px; font-size:10px; } #footer a { color:#b3adad; text-decoration:none; } #footer a:hover { text-decoration:underline; } #footer .footer-navigation { } #footer .footer-navigation ul { list-style:none; } #footer .footer-navigation ul li { float:left; padding-right:8px; margin-right:8px; border-right:1px solid #b3adad; height:10px; line-height:10px; } #footer .footer-navigation ul li.last { padding-right:0; margin-right:0; border-right:0; } #footer .footer-navigation ul li a { } #footer .right { float:right; font-family:Verdana, Arial, Sans-Serif; } #footer .right a { color:#dad7d7; font-weight:bold; text-decoration:underline; } #footer .right a:hover { text-decoration:none; } Index Page: Code: <?php if (isloggedin()) forward('pg/dashboard/'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>My Cook Family</title> <link rel="stylesheet" href="mod/xuum/css/style.css" type="text/css" media="all" /> <script type="text/javascript" src="mod/xuum/js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="mod/xuum/js/jquery.jcarousel.js"></script> <!-- Cufon --> <script type="text/javascript" src="mod/xuum/js/cufon-yui.js"></script> <script type="text/javascript" src="mod/xuum/js/MyriadPro.font.js"></script> <script type="text/javascript" src="mod/xuum/js/ArialBold.font.js"></script> <script type="text/javascript" src="mod/xuum/js/jquery-func.js"></script> <link rel="shortcut icon" type="image/x-icon" href="mod/xuum/css/images/favicon.ico" /> <link href="css/style2.css" rel="stylesheet" type="text/css" /> </head> <body> <style> .messages { background:#ccffcc; color:#000000; padding:3px 10px 3px 10px; z-index: 8000; margin:0; position:fixed; top:30px; width:969px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border:4px solid #00CC00; cursor: pointer; } .messages_error { border:4px solid #D3322A; background:#F7DAD8; color:#000000; padding:3px 10px 3px 10px; z-index: 8000; margin:0; position:fixed; top:30px; width:969px; -webkit-border-radius: 4px; -moz-border-radius: 4px; cursor: pointer; } .closeMessages { float:right; margin-top:17px; } .closeMessages a { color:#666666; cursor: pointer; text-decoration: none; font-size: 80%; } .closeMessages a:hover { color:black; } </style> <script type="text/javascript"> $(document).ready(function () { $('.messages').animate({opacity: 1.0}, 1000); $('.messages').animate({opacity: 1.0}, 1000); $('.messages').fadeOut('slow'); $('span.closeMessages a').click(function () { $(".messages").stop(); $('.messages').fadeOut('slow'); return false; }); $('div.messages').click(function () { $(".messages").stop(); $('.messages').fadeOut('slow'); return false; }); }); </script> <script type="text/javascript"> $(document).ready(function () { $('.messages_error').animate({opacity: 1.0}, 1000); $('.messages_error').animate({opacity: 1.0}, 1000); $('.messages_error').fadeOut('slow'); $('span.closeMessages a').click(function () { $(".messages_error").stop(); $('.messages_error').fadeOut('slow'); return false; }); $('div.messages').click(function () { $(".messages").stop(); $('.messages').fadeOut('slow'); return false; }); }); </script> <?php $messages = system_messages(); $message = $messages['messages']; if(count($message) > 0){ echo '<div class="messages">'; echo '<span class="closeMessages"><a href="#">click to dismiss</a></span>'; foreach($message as $message1) { echo '<p>'; echo $message1; echo '</p>'; } echo '</div>'; } $errors = register_error(); $error = $errors['errors']; if(count($error) > 0){ echo '<div class="messages_error">'; echo '<span class="closeMessages"><a href="#">click to dismiss</a></span>'; foreach($error as $error1) { echo '<p>'; echo $error1; echo '</p>'; } echo '</div>'; } //////////////////////////////////////////////////////////////////////////////////////////////// ?> <!-- Header --> <div id="header"> <div class="shell"> <!-- Logo --> <h1 id="logo"><a href="">My Cook Family</a></h1> <!-- /Logo --> <!-- Navigation --> <div id="navigation"> <ul> <li><a href="" class="active">HOME</a></li> <li><a href="pg/expages/read/Terms/">TERMS</a></li> <li><a href="pg/expages/read/Privacy/">PRIVACY</a></li> <li><a href="#">ABOUT</a></li> </ul> </div> <!-- /Navigation --> </div> </div> <!-- /Header --> <!-- Intro --> <div id="intro"> <div class="shell"> <!-- Slider Holder --> <div class="slider-holder"> <ul> <!-- Offer --> <li> <div class="offer-image"> <img src="mod/xuum/css/images/offer-image-1.jpg" alt="" /> </div> <div class="offer-data"> <h3>Wedding Reception</h3> <div class="entry"> <p>Steffany & Rodney's Wedding Reception will be held Sunday, August 7th, 2011 at 1:00PM. We are asking that people do not bring gifts. If you would like to donate to our honeymoon fund, please <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5S9F6GTNXNL6J" target="_new">click here</a>.</p> <p><strong>If you are a member of the family, please take time to register on this site. We have created this site as a safe, secure, and private area for us to socialize.</strong></p> </div> </div> </li> <!-- /Offer --> <!-- Offer --> <li> <div class="offer-image"> <img src="mod/xuum/css/images/offer-image-2.jpg" alt="" /> </div> <div class="offer-data"> <h3>Descendants of the Mayflower</h3> <div class="entry"> <p> The Pilgrims were a group of English people who came to America seeking religious freedom during the reign of King James I. They planned to make the crossing to America in two ships, the Speedwell and Mayflower. However, after many problems the Speedwell was forced to return to England where the group was reorganized. In their second attempt to cross the Atlantic, they boarded the Mayflower in September 1620 bound for the New World. </p> </div> </div> </li> <!-- /Offer --> <!-- Offer --> <li> <div class="offer-image"> <img src="mod/xuum/css/images/offer-image-3.jpg" alt="" /> </div> <div class="offer-data"> <h3>Purchase of Nantucket Island</h3> <div class="entry"> <p> The history of Nantucket's settlement by the English did not begin in earnest until 1659, when Thomas Mayhew sold his interest to a group of investors, led by Tristram Coffin, "for the sum of thirty Pounds...and also two beaver hats". The "nine original purchasers" were Tristram Coffin, Peter Coffin, Thomas Macy, Christopher Hussey, Richard Swain, Thomas Barnard, Stephen Greenleafe, John Swain and William Pike. </p> </div> </div> </li> <!-- /Offer --> <!-- Offer --> <li> <div class="offer-image"> <img src="mod/xuum/css/images/offer-image-4.jpg" alt="" /> </div> <div class="offer-data"> <h3>Whaling in New Bedford, MA</h3> <div class="entry"> <p> American whaling's origins were in New England. Whale oil was vital in illuminating homes and businesses throughout the world in the 19th century, and served as a dependable lubricant for the machines powering the Industrial Revolution. Whaling became important for a number of New England towns, particularly Nantucket and New Bedford, MASS. Vast fortunes were made, and culture of these communities was greatly affected.</p> </div> </div> </li> <!-- /Offer --> <!-- Offer --> <li> <div class="offer-image"> <img src="mod/xuum/css/images/offer-image-5.jpg" alt="" /> </div> <div class="offer-data"> <h3>Family Tradition - Panning for Gold</h3> <div class="entry"> <p>In memory of Grumpy (a.k.a. Nugget Bill); coined for the tradition of gold panning becoming such a big part of the Cook Family. Panning is now enjoyed by all generations of the Cook Family, with Glenn keeping the hobby alive as a part of his normal routine...</p> </div> </div> </li> <!-- /Offer --> </ul> </div> <!-- /Slider Holder --> <!-- Slider Navigation --> <div class="slider-navigation"> <ul> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> </ul> </div> <!-- /Slider Navigation --> </div> </div> <!-- /Intro --> <!-- Main --> <div id="main"> <div class="shell"> <!-- Box --> <div class="box-first"> <center> <h2>Login</h2> </center> <div class="buttons"> <center> <div id="welcome-box" class="buttons"> <div id="login-box" class="buttons"> <?php $form_body = " <p> <label>" .elgg_echo('username') ."<br />" .elgg_view ( 'input/text' ,array ( 'internalname' => 'username' ,'class' => 'login-textarea' ) ) ."</label><br /> "; $form_body .= "<label>" .elgg_echo('password') ."<br />" .elgg_view ( 'input/password' ,array ( 'internalname' => 'password' ,'class' => 'login-textarea' ) ) ."</label><br /> "; $form_body .= elgg_view ( 'input/submit' ,array ( 'value' => elgg_echo('login') ) ) ."</p> "; echo elgg_view ( 'input/form' ,array ( 'body' => $form_body ,'action' => "" .$vars['url'] ."action/login" ) ); ?> </center> </div> </div> <!-- /Box --> <!-- Box --> <div class="box-center"> <center> <h2>Newest Members</h2> </center> <div class="entry"> <!-- News --> <div class="news"> <ul> <li> <?php $users_max = 25; $onlyWithAvatar = "no"; if(empty($onlyWithAvatar) || $onlyWithAvatar == "no") {$users = get_entities('user','',null,null,$users_max,0);} else {$users = get_entities_from_metadata('icontime', '', 'user', '', 0, $users_max);} $wallIconSize = "small"; shuffle($users); foreach($users as $user){ echo elgg_view("profile/icon",array('entity' => $user, 'size' => 'small', 'override' => 'true')); } ?> </li> </ul> </div> <!-- /News --> </div> </div> <!-- /Box --> <!-- Box --> <div class="box last-box"> <center> <h2>Sign Up</h2> </center> <center> <div id="register-box"> <?php //////////////////////////////////////////////////////////////// $form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name', 'class' => "general-textarea", 'value' => $name)) . "</label><br />"; $form_body .= "<label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email', 'class' => "general-textarea", 'value' => $email)) . "</label><br />"; $form_body .= "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username', 'class' => "general-textarea", 'value' => $username)) . "</label><br />"; $form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password', 'class' => "general-textarea")) . "</label><br />"; $form_body .= "<label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "general-textarea")) . "</label><br />"; $form_body .= elgg_view('register/extend'); $form_body .= elgg_view('input/captcha'); if ($admin_option) { $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option')))); } $form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid'])); $form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode'])); $form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register')); $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>"; ?> <div id="register-box"> <h2> <?php //echo elgg_echo('register'); ?> </h2> <?php //////////////////////////////////////////////////////////////// echo elgg_view ( 'input/form' ,array ( 'body' => $form_body ,'action' => "{$vars['url']}action/register" ) ); ?> </div><!-- div id="welcome-box" --> </center> </div> <!-- /Box --> <div class="cl"> </div> </div> </div> <!-- /Main --> <!-- Footer --> <div id="footer"> <div class="shell"> <!-- Mini Nav --> <div class="footer-navigation"> <ul> <li><a href="<?php echo $vars['url']; ?>" class="active">HOME</a></li> <li><a href="<?php echo $vars['url']; ?>pg/expages/read/Terms/">TERMS</a></li> <li><a href="<?php echo $vars['url']; ?>pg/expages/read/Privacy/">PRIVACY</a></li> <li><a href="#">ABOUT</a></li> </ul> </div> <!-- /Mini Nav --> <!-- Copyrights --> <p class="right"> Copyright 2011 | MyCookFamily.info </p> <!-- /Copyrights --> <div class="cl"> </div> </div> </div> <!-- /Footer --> </body> </html> Hi all, very new at this so please pardon. I am attempting to format a series of 3 columns (using the CSS holy grail) into the main body of a .asp page. Everything goes smoothly, I have the columns looking exactly as I want them, however the style sheet appears to be causing problems with the header and footer of my asp page. Namely, it has caused the previously smoothed corner images (.gifs) in the header and footer to have a 90 degree thick white border around them. I assume that my style sheet for the body of the page is affecting elements in the header and footer as well, causing them to look odd. Is there a way to have a style sheet only affect part of my code locally and not all of it globally? Or make certain parts of my code immune to the style sheet via some sort of markup? Thanks! FYI for those interested: the style sheet I am trying to use to format my divs (frame(content left, content right, content center and content header)) is body { text-align:center; border:0px solid #000; } #frame { width:830px; margin-right:auto; margin-left:auto; margin-top:auto; padding:0px; text-align:left; } #contentleft { width:175px; padding:0px; left:auto; top:auto; float:left; background:#fff; border:0px solid #000; } #contentcenter { width:480px; padding:10px; float:left; text-align:left; background:#B7C8EE; } #contentright { width:175px; padding:0px; right:auto; top: auto; float:right; background:#fff; border:0px solid #000; } #contentheader { background:#345EA2; width:auto; } p,h1,pre { margin:0px 10px 10px 10px; } h1 { font-size:14px; padding-top:10px; } #contentheader h1 { font-size:14px; padding:10px; margin:0px; } #contentright p { font-size:10px} The .asp page I want to use this style sheet on is <!--#include file="headerauth.asp"--> <meta http-equiv="Content-Language" content="en-us"> <body topmargin="0" leftmargin="0"> <link rel="stylesheet" type="text/css" href="sddm.css" /> <link rel="stylesheet" type="text/css" href="box2.css" /> <STYLE> A:link {font-weight:bold} A:hover {background:white;} A:hover {background-color:white;} A:visited {color:green} A:active {color:red} </STYLE> <!--#include file="footer.asp"--> The sheet appears to be affecting both my headerauth.asp and footer.asp which I do not want it to do. Is there a way to stop it from propogating to both of these other files? Or perhaps wrap the code for each of these in some sort of a tag that tells it not to use the css? I cannot figure this out. I've tried adding clear: both in several places, I've tried overflow: hidden and I've tried cursing. Nothing works! How can this be fixed so that in IE6 the divs are not staggered vertically?? Code: <div style="height: 38px; margin: 0px; padding: 0px; width: 140px;"> <div style="float: left; height: 38px; width: 38px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="38" border="0"></div> <div style="float: right; height: 38px; width: 102px;">copy</a><br>copy</a></div> </div> <div style="height: 38px; margin: 0px; padding: 0px; width: 140px;"> <div style="float: left; height: 38px; width: 38px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="19" border="0"></div> <div style="float: right; height: 38px; width: 102px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="8" border="0"></div> </div> I've been working on putting a css/js text navigation together which thus far has seemed to work as intended on a PC. This morning when I checked it on a mac, it broke down. Technically it breaks down gracefully I suppose... All links are present and the nav is displayed fully expanded. The problem is that this nav is going to have hundreds of links, and having it fully expanded just isn't practical. If anyone could take a minute to look at my css & js to see if there's something simple that I'm missing, it'd be great. You can look at my example page he http://www.whitesagemedia.com/cssnav.html All css & js is included in the ssource - no attachements. Thank you, thank you, thank you, to anyone who can help me out. -Chet Hey there. Is it possible to add a line break so that the following markup... html Code: Original - html Code <dl> <dt>Posts:</dt> <dd>33</dd> <dt>Topics:</dt> <dd>4</dd> </dl> <dl> <dt>Posts:</dt> <dd>33</dd> <dt>Topics:</dt> <dd>4</dd> </dl> ...looks like this? Posts: 33 Topics: 4 Basically, I want it to be like display: block, but only to the RIGHT of the text. Does that make sense? Just like adding a <br />, but with different HTML. There must be a better way to accomplish this... I need a line break between the two headers in the page below. As it stands it works in Firefox and IE with <br> tags but this seems sloppy.....Is this what the clear element is for? Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <style> * { margin: 0; padding: 0; } body { margin:0; padding:0; background-color:#cccccc; } #wrapper { width: 700px; height: 565px; margin-left:auto; margin-right:auto; margin-top:10px; border: 1px solid #808080; background-color:#ffffff; } #sidebar { width: 123px; height: 565px; float: left; background-image:url(images/sidebar.jpg); } #content { margin-left: 125px; height: auto; width:auto; padding: 30px; font:Arial, Helvetica, sans-serif; font-size: 24px; font-style:oblique; color: #444444; } #01 { position:relative; } #02 { position:relative; margin-top:100px; } #b1w, #b2w, #b3w { position:relative; float:left; height:35px; width:35px; border:1px solid; border-color: #808080; margin-top: 5px; margin-right: 5px; background-color:#ffffff; } </style> <body> <div id="wrapper"> <div id="sidebar"></div> <div id="content"> <div id="01">Header 1</div> <div id="b1w"></div> <div id="b2w"></div> <div id="b3w"></div> <br><br><br> <div id="02">Header 2</div> </div> </div> </body> </html> |