Jump to content

Horizontal margin?


Ryusuke

Recommended Posts

You can indent the text onto this 'paper' background, with style.But first you must correct your markup because the entire content on the page is rendered as one link.

margin-left:200px
But while this way the margin controlls the placement, when the window gets resized, the content should be able to scroll with the window. So if you put a table or a div just for holding the content and the background, give it a width and center it, all would just slide along with the window smoothly and even will be in the middle of the window like you want.
Link to comment
Share on other sites

IE renders things strangely, and you might have an un-closed anchor tag somewhere. Post your code if you want some help there.You put the margin style on any element that you want it to apply to. If you want your entire page or content to have the margin, then enclose everything in a <div> tag, and apply the style there. You can do that like this:

<div style="margin-left: 200px;">...</div>

If your background is a specific width, and you want to keep the text over the background picture, you can also apply a width to make sure the text wraps where it is supposed to:

<div style="margin-left: 200px; width: 600px;">...</div>

Link to comment
Share on other sites

The text being a link is not due to exactly an anchor element that is not properly closed, but due to a certain image element that has no closing tag at all, and that the closing anchor tag behind it gets interpreted as image closing instead of anchor closing.Look at line 38, there are <img elements without any form of closing.Should be like this:

<a ... ><img src="" ... /></a>
Link to comment
Share on other sites

Cool cool I'm getting the hang of it!Thanks Dan and someguy

Wont something like this work????
<html><head><title>My Page</title></head><frameset rows=20%,80%><frame src="top.html" name="top"><frame src="bottom.html" name="bottom"></frameset><body></body><noframes><a href="your main page.html">Click Here</a></noframes></html>

or am i on wrong tracks lol

Link to comment
Share on other sites

For what i saw in your page, you want a centred content, correct?If so, use a code like this (with proper atributes, values, etc):

<html><head><style>body {text-align: center;}#wrapper {margin: 0 auto;width: 650px; /* use any u like */text-align: left;}</style></head><body><div id="wrapper">All your content goes here!!!</div></body></html>

This a very known css technique for centre aliging.This should be in the css forum...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...