...

View Full Version : HTML/CSS problem. Can't figure out how to align content correctly.



Mandiiz
02-15-2008, 10:36 PM
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.

Andrew Johnson
02-15-2008, 10:53 PM
Try changing this line:

<div style="background-image: url(bg.jpg); position: absolute; top: 384px; right: 30; width: 370px;">

To:

<div style="background-image: url(bg.jpg); position: absolute; top: 384px; right: 30; width: 350px;padding: 0 10px">

_Aerospace_Eng_
02-15-2008, 10:53 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum