CSS - Howto Get Rid Of Spacing?
Code:
#pics { margin:0; padding:0; background:#fff; } #pics ul{ margin:0; padding:0; list-style:none; } #pics ul img{ margin:0; padding:0; border-style: solid; border-color: #27076A; border-width: thin; } #pics li{ display:inline; margin:0; padding:0; } <div id="pics"> <ul> <li><img src="images/1.jpg"></li> <li><img src="images/2.jpg"></li> <li><img src="images/3.jpg"></li> <li><img src="images/4.jpg"></li> <li><img src="images/5.jpg"></li> <li><img src="images/6.jpg"></li> </ul> </div> The code above puts pics next to each other but width spaces inbetween them. I got margin and padding set to 0 and cant see why there spaces inbetween them. Am I missing something? Similar TutorialsI'm designing a page he (URL address blocked: See forum rules) I'm confused on how to make the top bar image span the width of each side and still be in synch with the center background image. I've done this with tables on the old version of the site (here ), but is it possible with CSS? Here's the code for the bars currently: .BGLEFTTOP{ position:absolute; left:0%; top:0px; height:88px; width:50%; margin-left:-456; background:url((URL address blocked: See forum rules)) repeat-x; background-position: right top; z-index:1;} .BGRIGHTTOP{ position:absolute; right:0%; top:0px; height:88px; width:50%; background:url((URL address blocked: See forum rules)) repeat-x; background-position: left top; z-index:1;} Hello, I Have an div of an sertain width. And there is some text like. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Which is wider then the div itself. Now the tekst overlaps the div borders. How can i fix this without getting a scrollbar. Thx in advance. Hi guys, When a div element displays a vertical scrollbar the width of the scrollbar is subtracted from the width of the element, so for example if the div has a width of 200px and the scrollbar is 18px, the 18px of the scrollbar is subtracted from 200px, this means that now 182px of the div is now visible, with the scrollbar occupying the other 18px. Is there a way to make the scrollbars add to the width of the element so when the scrollbar becomes active the viewable area of the DIV is still 200px and the width of the div + scrollbar is 218px. I've been playing around with some JavaScript/DOM type solutions, by using to the scrollHeight elementHeight variables to detect when the scrollbar is present and then changing the width of the div element, but I was wondering if there was a more elegant and less verbose solution using css? Regards, Khmer42 I would like to have the background-color of a complete table row changed when I move the mouse over it. Any ideas how to realize this within a CSS file (not with javascript) Thanks in advance Hi There - Am converting another design from tables, working with a CMS (Drupal) and an existing CSS / table combination that I didn't write and have no choice about. Think of the header as having three sections. The top section has logo on the left, search box on the right. Rounded corners. I'm cool with that section. Then there's a space. Created a div for the space. Love the space. Problems with the space in IE. Will go into it later. Then there's the next section. Rounded corners. Contains the entire page. On the left is a pulldown menu, about 1 cm from the top. On the right is a tabbed menu. This menu has flexible height. It needs to be right up against the bottom with the menu below it. Call this section the tabbed menu section. Third section. Immediately below that is a bar menu like the one Apple's got. Looks like a metal bar with divisions. Call this primary links. ---------- First, the space between. In IE, when you roll over the bar menu, the space disappears. Won't come back. Initially, in the second section, floated the pulldown menu left and the tabbed menu right. That worked fine, except that the tabbed menu had a width of 100% and pushed up the pulldown menu so the section was too wide. When I put it to 65%, all hell broke loose with the bar menu in the third section below it and bits of it snuck up into the second section. If I left it alone, and left the tabbed menu at 100%, when I checked over its container with firebug, it said that it was being affected by the primary links. I figured that out also because the background for that container was a really weird color that I finally found in the background of the navigation id and changed to white. Primary was overlapping it so I couldn't see it with firebug. So after fiddling with several clearing methods, I gave up and decided to try a table. Table worked fine, and the second section looks good except that there's a one pixel space between the tabbed menu and the bar menu. --------- It is my greatest wish right now to be able to float the pulldown to the left, the tabbed menu to the right and have the primary links stay below. I wish I could get the space to work and I wish for a clear understanding of it all so I can then figure out where to put the corners. Anyone who can enlighten me on this would have my undying gratitude. I've been working on this all day and the deadline's tomorrow. Code: <div id="top part" logo and searchbox </div> <div> that pesky space that disappears in IE when roll over primary links </div> <div id=navcontainer> dropdown and tabbed menu </div> <div id="navigation" class="menu> <!-- couldn't find the menu class in the css --> <div id="primary" class="clear-block"> contains barmenu - very fussy </div> </div> Here's the relevant CSS: Code: div#navigation { background: #fff url(../images/blue/menu-bg.png) 100% 100% repeat-x; } #primary { line-height: 30px; } #primary ul { padding:0; margin:0; list-style:none; } #primary li { display:inline; } #primary a { font-weight:bold; display:block; float:left; padding:0px 14px 0px 14px; margin: 0px 1px 0px 0px; font-size: 95%; } #primary a { background-position:0% 0px; } #primary a:hover { text-decoration: none; background-position:0% -42px; } #primary a.active { background-position: 0% -84px; } #primary a { background: url(../images/blue/menu-div.png) 100% 0 repeat-y; color:#666666; font-size: 120%; font-family:Arial,Helvetica,sans-serif; } #primary a:hover { color: 666666; background: #B8B8B8; } #primary a.active { color: 666666; background: #B8B8B8; } Hello All, I wanted to ask a question. I'm having trouble with spacing between two divs. Here's the site I'm working on: johnraymondonline.com/mjbfoundation/ The problem is that I'm trying to put a 20pixel margin between the bottom footer div (that contains "test test") and the div just above it. I'm not having much luck at all. I've done a clear and also have checked the divs several times to see if I've missed any. I've even put a div between with some height and that doesn't work. I'm not sure if one of the div's above it has a fixed height. Any help would be greatly appreciated! Thanks! This is my first time ever working with CSS. I am trying to put together a site; however, I am havings some setbacks straight out of the gate. I am trying to get the navigation bar to align up against the header. How do I eliminate the spacing between the header and the navigation bar? I have tried the padding: 0; method with no luck. PLEASE HELP! Hi Guys I am having trouble trying to work out a bug that is creating a space between two div containers. To see what i mean click here for web page the css can be viewed here in firefox the two containers appear correctly but in internet explorer there is a 10px space between them. Could it have something to do with the background images? The div containing the login form also drops down in ie and i am convinced this is related to the main problem i am facing. Does anyone have any ideas as to what the problem is. Any help would be much appreciated! I have a drop down menu that works great in Chrome but in IE 9 I am getting spaces between my images for my navigation bar. My HTML is as follows... HTML Code: <ul id="nav"> <li><a href="#"><img src="../../images/global/header/home_btn.jpg" width="77" height="29" border="0" /></a> <ul> <li><a href="#" style="color:#000;">About Asthma</a></li> <li><a href="#" style="color:#000;">Treatment</a></li> <li><a href="#" style="color:#000;">Taking Control</a></li> <li><a href="#" style="color:#000;">Lifestyle</a></li> <li><a href="#" style="color:#000;">Resources & Support</a></li> </ul></li> <li><img src="../../images/global/header/spacer01.jpg" width="17" height="29" border="0" /></li> <li><a href="#"><img src="../../images/global/header/kids_btn.jpg" width="66" height="29" border="0" /></a></li> <li><img src="../../images/global/header/spacer01.jpg" width="17" height="29" border="0" /></li> <li><a href="#"><img src="../../images/global/header/allergy_btn.jpg" width="67" height="29" border="0" /></a></li> <li><img src="../../images/global/header/spacer01.jpg" width="17" height="29" border="0" /></li> </ul></li></ul> I have tried everything in my CSS to eliminate the spacing between the image files with no luck. Does anyone see what I am doing wrong here? Hi there, we have created the following list menu and we want to reduce the space between the left hand page margin, and the disc, at the 1st part of the text closer. Example: This is what we see now. | Text Here Example: This is what we would like to see. | Text Here Any suggestions? ul a, li a{ margin:0; padding:0; } I am new to doing layouts in CSS and have a page (on an existing site) that I just did using CSS. The problem that I am having is that the "content" div has unwanted space above and below the div. I have padding & margins set to zero for the content div. Page is he http://www.prairieplugs.com/Sample1/sample1.htmlhttp://www.prairieplugs.com/Sample1/sample1.html CSS is he http://www.prairieplugs.com/Sample1...ieplugscss1.css Below is the CSS that is applicable: Code: body { margin: 0px; padding: 0px; font-family: Verdana, Geneva, sans-serif; font-size: .9em; color: #000; background-color: #008F13; background-image: url(images/bgbottom.jpg); background-repeat: repeat-x; background-position: bottom; background-attachment: fixed; } #wrapper { width: 900px; margin-right: auto; margin-left: auto; padding-top: 15px; } #wrapper #header { background-image: url(images/headerSamp1.jpg); margin: 0px; padding: 0px; height: 276px; background-repeat: no-repeat; } #wrapper #nav { background-color: #FFF; background-image: url(images/navSamp1.jpg); background-repeat: no-repeat; height: 60px; width: 900px; margin: 0px; padding: 0px; text-align: center; } #wrapper #content { background-image: url(images/contentSamp1.jpg); background-repeat: repeat-y; margin: 0px; width: 900px; background-color: #FFF; padding: 0px; } #wrapper #footer { font-family: Arial, Helvetica, sans-serif; font-size: 0.8em; background-repeat: no-repeat; height: 79px; background-color: #FFF; background-image: url(images/footerSamp1.jpg); margin: 0px; padding: 0px; } #wrapper #nav ul { margin: 0px; list-style-type: none; text-align: center; padding-top: 20px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #060; } #wrapper #footer p { text-align: center; margin: 0px; padding-top: 25px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; } #wrapper #nav ul li { display: inline; border-right-width: 3px; border-right-style: solid; border-right-color: #000; font-size: 1.2em; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-weight: bold; font-variant: small-caps; padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; } #wrapper #nav ul li.last { border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; } #wrapper #nav ul li a:visited { text-decoration: none; } #wrapper #nav ul li a:hover { color: #000; text-decoration: underline; } #wrapper #nav ul li a { text-decoration: none; color: #FFF; } #wrapper #content p { font-family: Tahoma, Geneva, sans-serif; font-size: 1em; text-align: left; padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 15px; } This is starting to bug me this problem, but on my site www.readinginfo.co.uk the background image (inner shadow and small gradient) at the top is playing up. It doesn't seem to want to align all the way over to the left, however as is always the way, it is working in firefox, ie7, 8 and safari. I've tried some of the ie6 fixes mentioned but I have the sneakiest of feelings that it is to do with the form element (the search box), positioning absolutely just bumps it over to the side. Thanks in advance for any reply!! Thanks for taking the time to read my question. The contents in my .ContentContainer are positioned differently in IE6 and FF. I want them to look like FF. What is wrong with my CSS that makes IE6 have more space on the left side of the green globe than FF? My goal is to have the 2 blue vertical lines line up. They line up in FF and IE7, but not in IE6. www.scopicdesigns.com/ZoneAll/index.htm Thanks, Brad I just launched my first website and I am having a little problem with spacing, it is pretty obvious. I tried the _ hack, and I played with some padding, but I couldn't get the thing to budge in IE. the site is (psugmb.com) Please help! Thank you! ::Kyle I have a top nav that is not dispersing the text across the full length. I tried word spacing but that messes up 2 of the links that are 2 words. So I though Justify would do it but it doesn't. I don't want to use spacer gifs and want to keep it text instead of graphics like the designer wants (the designer is not web savvy but I'm teaching her...). What is the best way to accomplish an evenly spaced top nav? Code: #top-nav { position:absolute; left:222px; top:106px; width:550px; height:33px; background: url(images/top_nav.jpg); font-size: 11px; } .top_nav a:link, .top_nav a:visited, .top_nav a:link, .top_nav a:active { font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFFF; text-decoration: none; } .top_nav a:hover { font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color:#808080; text-decoration: none; } Code: <div id="top-nav"><div class="top_nav" align="justify" style="margin: 10px 0 0 20px;"> <a href="index.html">HOME</a> <a href="about_us.html">ABOUT US</a> <a href="dances.html">DANCES</a> <a href="services.html">SERVICES</a> <a href="parent_info.html">PARENT INFO</a> <a href="contact.html">CONTACT</a> </div></div> Test site Thanks in advance for your time! I'm having a problem with my content div positioning in IE 6 only. The best way to show my issue would be to show you a screenshot of the issue with both IE 6 and IE 7 (see attached) IE6 is on the left and IE7 on the right. index.php Code: <div id="main"> <div id="content"> <div class="leftColumn"> <?php include_once "includes/inc_leftColumn.php"; ?> </div> <div class="rightColumn"> <?php include_once "includes/inc_rightColumn.php"; ?> </div> <div class="middleColumn"> <?php include_once "includes/inc_index_page.php"; ?> </div> </div> <div id="footer"> <?php include_once "includes/inc_footer.php"; ?> </div> </div> attached stylesheet css Code: Original - css Code #content { width: 970px; height: auto; /*min-height: 500px;*/ margin: 0px 0px 0px 0px; background: url('/media/images/global_content_background.gif') repeat-y; } #content div.leftColumn{ min-height: 435px; margin-left:5px; padding:15px 15px 15px 15px; float:left; width:170px; z-index:1; text-align: left; vertical-align: text-top; background: url('/media/images/global_leftcolumn_background.gif') no-repeat; } #content div.middleColumn{ min-height: 435px; padding:15px 15px 15px 15px; float:right; width:530px; text-align: left; vertical-align: text-top; } #content div.rightColumn{ min-height: 435px; padding:15px 15px 15px 15px; margin-right:5px; float:right; width:170px; text-align: left; vertical-align: text-top; background: url('/media/images/global_rightcolumn_background.gif') no-repeat; }
Hey all. I am attempting to create a memberlist type page for my website that has a list on the left and when clicked it shows the members information on the right. I have the positioning down and everything but the problem I am running into is how it displays in IE and Firefox. In Firefox my list looks exactly how I would like it to and works fine. In IE however, the png images i used for the "Memberlist Title" and the bottom rounded edges image appear a different color than the list items... . Also, when clicked the list item stays highlighted with the rollover color and I cant figure out why. Here is my css its at bestinefight.net/memberlist.php Code: /* Memberlist */ #navcontainer { width: 210px; margin-left:109px; } #navcontainer ul { margin-left: 0; padding-left: 0; list-style-type: none; font-family: Arial, Helvetica, sans-serif; } #navcontainer a { display: block; width: 200px; background-color: #4B4535; padding: 0px 0px 0px 10px; border: 0; } #navcontainer a:link, #navlist a:visited { font-size:10px; color: #dbdfaa; text-decoration: none; border: 0; padding: 0px 0px 0px 10px; outline:none; } #navcontainer a:hover, #navlist a:active { font-size:10px; background-color: #8B8063; color: #dbdfaa; border: 0; text-decoration:none; outline:none; } #profile_holder { background-image:url(profile.png); background-position:top; background-repeat:no-repeat; width:300px; height:200px; float:right; margin-right:30px; } #profile { width:260px; height:180px; margin: 40px auto; } #memberlist { width:250px; height:300px; float:left; } #memberlist_title { background-image:url(memberlist.png); width:228px; height:31px; margin-left:100px; } #memberlist_bottom { background-image:url(memberlist_bot.png); height:21px; width:210px; margin-left:109px; } Here is the code for my page. Code: <div id="memberlist"><div id="memberlist_title"></div><div id="navcontainer"> <ul id="navlist"> <li><a href="#">Aslad</a></li> <li><a href="#">Bilos</a></li> <li><a href="javascript:ajaxpage('memberlist/Boustij.php', 'profile');">Boustij</a></li> <li><a href="#">Brak</a></li> <li><a href="#">Cydian</a></li> <li><a href="#">Diablo</a></li> <li><a href="#">Equilibruim</a></li> <li><a href="#">Cydian</a></li> <li><a href="#">Faller</a></li> <li><a href="#">GoOsE</a></li> <li><a href="#">Melik</a></li> <li><a href="javascript:ajaxpage('memberlist/Mika.php', 'profile');">Mika</a></li> <li><a href="#">Nekos</a></li> <li><a href="#">Normanalata</a></li> <li><a href="#">O'rian</a></li> <li><a href="#">Pooga</a></li> <li><a href="#">Romu'lis</a></li> <li><a href="#">Sena</a></li> <li><a href="#">Tepor</a></li> </ul> </div> <div id="memberlist_bottom"></div> </div> <div id="profile_holder"><div id="profile"></div></div> as 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. I've been pounding my head on this theme. Here's what it looks like in Firefox and Safari Here's what it looks like in IE As you can see there is a spacing issue in IE. This is a theme for Vanilla which uses list tags to generate the listing of forum topics, I'm trying to stay away from altering the original structure as much as possible (which gets messy), so I use Firebug to help me build the CSS. Any ideas? |