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 15 of 15
  1. #1
    Regular Coder
    Join Date
    Nov 2008
    Posts
    122
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Problem inserting image in the right column

    I want to add a image on the right column of my website. I did the whole background: url(images/News.png) in my css but it didn't work. I uploaded the image into my ftp and it still didn't work. Any ideas?

  • #2
    Regular Coder
    Join Date
    Nov 2008
    Posts
    122
    Thanks
    5
    Thanked 0 Times in 0 Posts
    alright nvm it showed up now but it was way to big (thats what she said) I'll have to resize it. But I know I'll have a prob in a sec adding links into there with it messing up my nav links. Help

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello Mccall101,
    How's it been going?

    A link to your site might help others help you, at least some code so they know what your trying.

    For links in your right column, just give the ul an id and style it seperately from your nav links.
    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

  • #4
    Regular Coder
    Join Date
    Nov 2008
    Posts
    122
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Hey there. Well I got it placed on my site but i want to position it better. When I put some padding top on it a little sliver of a different color showed up.

    [CODE]body{
    text-align: center;
    background: #ccd8e1;
    font: 16px Helvetica, arial, sans-serif;
    }
    * {
    margin: 0;
    padding: 0;
    border: none;
    }
    #container {
    width: 1023px;
    margin: 0 auto;
    }
    #header {
    width:1023px;
    height:242px;
    background:url(http://www.skodesigns.com/images/SKODesigns2_02.png) no-repeat;
    }
    #nav {
    width: 1023px;
    height: 114px;
    background:url(http://www.skodesigns.com/images/SKODesigns2_03.png) no-repeat;
    text-align: center;
    }
    li {
    list-style-type: none;
    display: inline;
    padding: 0 32px;
    text-decoration: none;
    font: 18px/80px Helvetica;

    }
    #content {
    width: 1023px;
    height: 620px;
    background:url(images/SKODesigns2_05.png) no-repeat;
    text-align: left;
    }

    #footer{

    position: center;
    width: 1023px;
    height: 22px;
    background-image: url(images/SKODesigns2_07.png);
    background-repeat: repeat-y;
    color: white;
    }

    p {
    margin: 10px;
    text-align: left;
    color: #fff;
    text-indent: 10px;
    }

    h2{
    text-align: left;
    text-indent: 0.5cm;
    padding-top: 20px;
    color: white;
    text-decoration: none;
    font-family: Arial Rounded MT Bold;

    }


    #left {
    float: left;
    width: 600px;
    }

    #right {
    margin: 0 0 0 600px;
    background-image: url(images/News.png) no-repeat;
    width: 341px;
    height: 391px;
    ;
    }


    a {
    Color: blue;
    text-decoration: none;
    }

    h3{text-align: left;
    text-indent: 0.5cm;
    padding-top: 20px;
    color: white;
    text-decoration: none;
    font-family: Arial Rounded MT Bold;
    }

    form{
    width: 200px;
    text-align: center;
    padding-top: 20px;
    }[CODE]

    I wanna push it down a little and to the right

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I wanna push it down a little and to the right
    Push what? We are not psychic to guess your corresponding html code! Please follow http://www.codingforums.com/postguide.htm AFAP.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #6
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Code:
    #right {
    margin: 0 0 0 600px;
    background-image: url(http://www.skodesigns.com/images/News.png) no-repeat;
    width: 341px;
    height: 391px;
    background-position: center;
    }
    That's not valid.
    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

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Code:
    #right {
    margin: 0 0 0 600px;
    background: url(http://www.skodesigns.com/images/News.png);
    height: 391px;
    }
    Your posted code above needs edited to fix the closing tag. It should look like this - [/code]
    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

  • #8
    Regular Coder
    Join Date
    Nov 2008
    Posts
    122
    Thanks
    5
    Thanked 0 Times in 0 Posts
    is that gonna make it go to the right and sorta in the center of the right column?

  • #9
    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 Mccall101 View Post
    is that gonna make it go to the right and sorta in the center of the right column?
    No, that will make the background image the full width of the 391px tall #right.
    Try it and see. If that's not quite what you want, maybe you could explain a little better what you do want it to look like and I'm sure we can do that. I'm just not sure what you're after when you say "position it better."
    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

  • #10
    Regular Coder
    Join Date
    Nov 2008
    Posts
    122
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Like I want it in the center of my right column. I want some space all around. It's just gonna be a News column

  • #11
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    You can try it like this. I just put the border around it so you could see what size the right column is...
    Code:
    #right {
    margin: 0 0 0 600px;
    padding: 20px 0 0 0;
    background: url(http://www.skodesigns.com/images/News.png) no-repeat center;
    height: 391px;
    border: 1px solid #f00;
    }
    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

  • #12
    Regular Coder
    Join Date
    Nov 2008
    Posts
    122
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    You can try it like this. I just put the border around it so you could see what size the right column is...
    Code:
    #right {
    margin: 0 0 0 600px;
    padding: 20px 0 0 0;
    background: url(http://www.skodesigns.com/images/News.png) no-repeat center;
    height: 391px;
    border: 1px solid #f00;
    }
    Have I told you how awesome you were today?

  • #13
    Regular Coder
    Join Date
    Nov 2008
    Posts
    122
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Now how do I align the text in the column? would I do it in css or html?

  • #14
    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 Mccall101 View Post
    Have I told you how awesome you were today?
    Actually, you've only thanked 3 people ever.

    Join Date: Nov 2008
    Posts: 79
    Thanks: 3
    Thanked 0 Times in 0 Posts

    Put your NEWS text in a div that's centered in the right column. You can move that image into it instead of the way it's positioned now too.
    By putting another div in the right column you'll have more control over the different things you'll be putting in a news box, like header, links and a few sentences.
    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

  • #15
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Try this -
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    html, body {
    	font: 14px "Comic Sans MS";
    	background: #FC6;
    	text-align: center;
    }
    * {
    	margin: 0;
    	padding: 0;
    	outline: none;
    	border: none;
    }
    #container {
    	width: 1023px;
    	margin: 30px auto;
    	background: #999;
    	overflow: auto;
    }
    
    #left {
    float: left;
          width: 600px;
        }
    #right {
    margin: 0 0 0 600px;
    text-align: left;
    }
    .box {
    	width: 341px;
    	height: 391px;	
    	margin: 10px auto 0;
    	background: url(http://www.skodesigns.com/images/News.png);
    }
    h3 {
    	font-size: 18px;
    	line-height: 18px;
    	color: #FFF;
    	background: #666;
    }
    .box p {margin:10px;}
    </style>
    </head>
    <body>
        <div id="container">
                <div id="left">
                </div>
            <div id="right">
                    <div class="box">
                        <h3>News</h3>
                            <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>
                    <!--end .box--></div>
                <div class="box">
                        <h3>Info</h3>
                            <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. 
                            </p>                
                <!--end .box--></div>
            <!--end right--></div>
        <!--end container--></div>
    </body>
    </html>
    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


  •  

    Posting Permissions

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