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.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Oct 2006
    Posts
    181
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Question Div Overlapping (Rounded Border)

    Hi, i think visiting http://scalamoosh.com will show clearly what my problem is.

    the div below the 'Article Title' which just displays 'Text' i would like to be raised up slightly, but be behind the title div, so the round borders do not have the small gap.

    hope this is clear enough.

    thanks!
    Quote Originally Posted by Excavator
    write it for firefox then hack it for IE

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,739
    Thanks
    22
    Thanked 1,836 Times in 1,820 Posts
    Hello Shoot2Kill,
    Merry Christmas

    Putting the rounded corners on the p tag may not be the best way to do this. Your posts would all be limited to one paragraph that way.

    Instead, put rounded corners on the article element and put "Article Title" and "one line...article" in a heading tag with bottom rounded corners.
    That way the article can expand to contain multiple paragraphs and pictures and whatever else you put in there.
    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
    Regular Coder
    Join Date
    Oct 2006
    Posts
    181
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Thanks, that does sound like a much better way, however i am having trouble implementing it.

    when you say use the title and subtitle in a heading, i guess you mean <header> ?

    when i try that, the header (with a border) is displayed below both titles and with no content.

    http://scalamoosh.com to see what i mean.

    edit--
    also, firefox is showing an extra border above the title, that chrome doesnt show.

    edit #2--
    Excuse my rudeness, Merry Christmas Excavator!
    Last edited by Shoot2Kill; 12-26-2010 at 01:18 PM.
    Quote Originally Posted by Excavator
    write it for firefox then hack it for IE

  • #4
    Regular Coder
    Join Date
    Oct 2006
    Posts
    181
    Thanks
    1
    Thanked 6 Times in 6 Posts
    I have it working a little better now, but still would like the original look if possible..

    http://scalamoosh.com
    Quote Originally Posted by Excavator
    write it for firefox then hack it for IE

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,739
    Thanks
    22
    Thanked 1,836 Times in 1,820 Posts
    You're getting there. I think you are mis-naming elelments though. It seems to me a section would contain multiple articles, not the other way around.

    Try it like this -
    Code:
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <style type="text/css">
    html, body {
    	margin: 0;
    	font: 100% "Trebuchet MS", Arial, Helvetica, sans-serif;
    	color: #000;
    	background: #fc6;
    }
    		/* HTML5 tags */
    		header, section, footer,
    		aside, nav, article, figure {display: block;}
    #container {
    	width: 900px;
    	margin: 0 auto;
    	background: #999;
    	overflow: auto;
    }
    section {
    	width: 675px;
    	float: left;
    	margin: 25px 0 0 5px;
    	padding: 2px 0 0;
    }
    	section header {
    		text-align: center;
    		background: #220b28;
    		border: 2px solid #bbb;
    		border-radius: 10px;
    		-moz-border-radius: 10px;
    	}
    		section header h1 {
    			margin: 0px 2px 0px 2px;
    			font-size: 1.4em;
    			color: #e15f0b;
    		}
    		section header h2{
    			margin: 0 2px 0 2px;
    			padding-bottom: 5px;
    			font-size: 1.2em;
    			color: #ddd;
    		}
    section article {
    	margin: -10px 0 20px;
    	padding: 20px;
    	border: 2px solid #bbb;
    	-moz-border-radius: 0 0 10px 10px;
    	border-radius: 0 0 10px 10px;
    	border-top: none;
    }
    aside {
    	height: 400px;
    	width: 180px;
    	float: right;
    	background: #ccc;
    }
    </style>
    </head>
    <body>
        <div id="container">
        <section> 
        	<header>
            	<h1>The Streets</h1>
                <h2>Computers & Blues</h2>
            </header>
            <article>
                <p>Posted Today, at 16:00, By <a href="#">Scalamoosh</a></p>
                <p>
                    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna 
                    aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no 
                    sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam 
                    nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo 
                    duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
                </p>
            </article>
        </section>
            <aside>
            </aside>
        <!--end container--></div>
    </body>
    </html>

    Background colors are running over borders since negative margins are needed to move the sides up to tie in together, so I left them out for now. You will probably need some z-index to fix that...
    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


  •  

    Tags for this Thread

    Posting Permissions

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