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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HTML/CSS problem. Can't figure out how to align content correctly.

    All right. This may be simple for some people so hopefully I can get some help. Please have a little bit of patience because I'm not positive how to explain exactly to where people will actually understand me. I will, however, try my very best to explain the best I can. If you have any questions about what I'm asking, feel free to ask me... I've found one person who can help and he wants to charge me. For this one simple problem...

    I'm making a hatelisting. They're not huge sites so they only require a very simple layout. Okay, easy. I have the layout set up (except the links) and I have the HTML and CSS ready (well, CSS prepared for editting). I know where I want the layout to align and such... Everything like tha is finished.

    http://www.lume-di-luna.net/test/index.html

    As you can see, it looks okay. Nothing big and fancy, something simple. ONE LITTLE DETAIL. The content of the website is just suppose to be in the black part, not the white. The white is just a border. But the only way I ever knew how to align the text was it would be the same size as the size of the background image.

    http://www.lume-di-luna.net/test/bg.jpg

    This is the background image. You can only see the black, but there is 10px of white on each side. That's the only way I have figured out so far to get the white border to work and the background as well.

    I want to align the content so it's only in the black, not the white. I searched everywhere and nothing will help me at all. I'm sure HTML and CSS will have to be involved to get it to work. I've searched multiple ways on google and looked around HTML/CSS help sites and nothing will help me at all.

  • #2
    Banned
    Join Date
    Feb 2008
    Location
    Winnipeg, Canada
    Posts
    396
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Try changing this line:
    Code:
    <div style="background-image: url(bg.jpg); position: absolute; top: 384px; right: 30; width: 370px;">
    To:
    Code:
    <div style="background-image: url(bg.jpg); position: absolute; top: 384px; right: 30; width: 350px;padding: 0 10px">

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You need to add padding to the div that holds the text. There are a lot of issues with your code. It was coded poorly. You are missing a doctype, you are using inline CSS, you also don't have units on your top and left values.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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