Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    New Coder
    Join Date
    Nov 2012
    Posts
    69
    Thanks
    7
    Thanked 0 Times in 0 Posts
    I'm trying to fix a new issue myself, but to hours of no avail. To remove bullet points from appearing in the buttons, I pasted the code you've written below:

    Code:
    .header img {float: left;}
    	.header ul {
    		margin: 5px 0 0 400px;
    		text-align: center;
    		list-style: none;
    	}
    That works fine for the buttons. However, I'd like to bullet point some of the text in the body of a few pages. I tried the "You need to define a class for the bullets you want to hide" suggestion given at the page linked here:

    http://stackoverflow.com/questions/1...how-them-for-l

    However, all I seem to be doing is making things worse following that. As things are with the existing code (not making the above changes), when trying to code in a list in the text, it is not showing any bullet points (I'd prefer diamonds if possible), and is instead moving that text outside the margin/padding, with all my text style tweaks not showing on that listed text.

    How do I limit the "list-style-none" to the buttons/header only?

    Thanks again...
    Last edited by MMM717; 11-16-2012 at 11:27 PM.

  2. #17
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by MMM717 View Post
    How do I limit the "list-style-none" to the buttons/header only?
    You need to know about specificity now.


    You just need to be very specific which li does, or doesn't, get a bullet. If .header ul is not specific enough, giving that ul an id would make it more specific

    Like this -
    Code:
    <div class="header">
    <ul id="noBullet">
    <li> ...
    and in your CSS would be
    Code:
    .header img {float: left;}
    	.header ul#noBullet {
    		margin: 5px 0 0 400px;
    		text-align: center;
    		list-style: none;
    	}
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  3. Users who have thanked Excavator for this post:

    MMM717 (11-17-2012)

  4. #18
    New Coder
    Join Date
    Nov 2012
    Posts
    69
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Thanks Excavator.

    The new code you posted is thankfully keeping the bullet points away from the buttons in the header, but I'm still having the same problems with the text not receiving the bullet point, getting pushed to the left edge, losing their styling tweaks, etc.

    That page you provided the link to is interesting, but I couldn't figure out how to make use of it with my problem. I couldn't find anything existing in the code that had a "p" CSS element (unless I'm glazing over something or misunderstanding), and when trying to stick those more specific element choices they noted somewhere in the code, I still can't get things right...

    I've pasted the code below as I currently have it for one of the pages I need bullet points for, except all the text/file names/etc. have been changed to generic. Are you getting this same problem on your end? What should I change? Thank you...


    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    html, body {
    	font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
    	background-color: #C9D6A0;
    	margin: 0;
    	padding: 0;
    	color: #000;
    	font-family: "Century Gothic";
    }
    
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you 
    
    do here will cascade to the .nav list unless you write a more specific selector. */
    	padding: 0;
    	margin: 0;
    }
    h1, h2, h3, h4, h5, h6, p {
    	margin-top: 0;	 /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
    	padding-right: 15px;
    	padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
    	text-shadow: #A2C8CA 0 0 1px;
    	-webkit-text-stroke: 0.65px
    	-webkit-font-smoothing: antialiased;
    	color: #AED6D9;
    	font-weight: 525;
    	font-size: 11pt;
    	line-height: 150%;
    }
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
    	border: none;
    }
    /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
    a:link {
    	color: #42413C;
    	text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    }
    a:visited {
    	color: #6E6C64;
    	text-decoration: underline;
    }
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
    	text-decoration: none;
    }
    
    /* ~~ this fixed width container surrounds the other divs ~~ */
    .container {
    	width: 960px;
    overflow: auto;
    	background-color: #603B3D;
    	margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
    }
    
    /* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
    .header {
    	height: 200px;
    	width: 960px;
    	background-color: #603B3D;
    	text-align: left;
    	position: fixed;
    }
    .header img {float: left;}
    	.header ul#noBullet {
    		margin: 5px 0 0 400px;
    		text-align: center;
    		list-style: none;
    	}
    		.header ul li {
    			width: 127px;
    			margin: 0px;
    			float: left;
    		}
    
    /* ~~ This is the layout information. ~~ 
    
    1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be 
    
    added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
    
    */
    
    .content {
    margin: 186px 0 0;
    	padding: 10px 0;
    	font-family: "Century Gothic";
    	font-size: 12pt;
    }
    
    /* ~~ The footer ~~ */
    .footer {
    	padding: 10px 0;
    	background-color: #CCC49F;
    }
    
    /* ~~ miscellaneous float/clear classes ~~ */
    .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    	float: right;
    	margin-left: 8px;
    }
    .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
    	float: left;
    	margin-right: 8px;
    }
    .clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
    	clear:both;
    	height:0;
    	font-size: 1px;
    	line-height: 0px;
    }
    body,td,th {
    	color: #AED6D9;
    }
    -->
    </style>
    
    </head>
    
    <body>
    
    <div class="container">
      <div class="header"><img src="logo" width="443" height="186" alt="Logo 443"><ul id="noBullet">
                    	<li><a href="#"><img src="site button.jpg" width="127" height="90" alt="Button"></a></li>
                    	<li><a href="#"><img src="site button.jpg" width="127" height="90" alt="Button"></a></li>
    		<li><a href="#"><img src="site button.jpg" width="127" height="90" alt="Button"></a></li>
    		<li><a href="#"><img src="site button.jpg" width="127" height="90" alt="Button"></a></li>
    		<li><a href="#"><img src="site button.jpg" width="127" height="90" alt="Button"></a></li>
    		<li><a href="#"><img src="site button.jpg" width="127" height="90" alt="Button"></a></li>
    		<li><a href="#"><img src="site button.jpg" width="127" height="90" alt="Button"></a></li>
    		<li><a href="#"><img src="site button.jpg" width="127" height="90" alt="Button"></a></li>
                    </ul></div>
      <div class="content">
        <p>&nbsp;</p>
        <p><br>
        Paragraph 1</p>
        <p>Paragraph 2:<br>
      </p>
        <p>&nbsp;</p><ul>
        <li>Bulleted item
      </li>
        <li>Bulleted item
        </li>
        <li>Bulleted item
        </li>
        <li>Bulleted item
      </li>
        <li>Bulleted item
      </li>
        <li>Bulleted item
      </li>
        <li>Bulleted item
      </li>
        <li>Bulleted item
      </li>
        <li>Bulleted item
      </li></ul>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>Paragraph 3</p>
        <p>&nbsp;</p><ul>
        <li>Bulleted item</li>
        <li>Bulleted item</li>
        <li>Bulleted item
        </li></ul>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>Paragraph 4<br>
        </p><ul>
        <li>Bulleted item</li>
        <li>Bulleted item</li>
        <li>Bulleted item</li>
        <li>Bulleted item
        </li></ul>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>Paragrapgh 5</p>
        <p>&nbsp;</p>
        <strong>
        <!-- end .content -->
      </strong></div>
      <div class="footer">
        <p>Footer</p>
        <!-- end .footer --></div>
      <!-- end .container --></div>
    </body>
    </html>

  5. #19
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    In your CSS, you zero out the default padding that makes room for the bullet with this bit -
    Code:
    ul, ol, dl {
        margin: 0;
        padding: 0;
    }
    Remove that bit in red and see what happens.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  6. Users who have thanked Excavator for this post:

    MMM717 (11-17-2012)

  7. #20
    New Coder
    Join Date
    Nov 2012
    Posts
    69
    Thanks
    7
    Thanked 0 Times in 0 Posts
    That fixed it! I then had to add my font tweaks to the code that the list items are part of, and it's OK now. I know I'm going to have at least one other issue with the site, but that will be for another thread. Thanks again so much.


 
Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •