Simple html alignment problem...

6 replies
  • WEB DESIGN
  • |
I'm creating a landing page in html. I have a large image as the background. I've added some text in dreamweaver over that image but the problem is, when I view the page in a browser, the text loses alignment with the background.

I can get it back in place by stretching the width of the browser. But I'm looking for a way to have the text stay in alignment with the background.

Hope what I'm asking is clear...

Thanks
#alignment #html #problem #simple
  • Profile picture of the author dansbanners
    Is the website you're referring to in your signature?
    {{ DiscussionBoard.errors[8952803].message }}
    • Profile picture of the author Krishna876
      No it's not the site in my signature. I'm creating an html landing page that I havent uploaded yet...

      Originally Posted by dansbanners View Post

      Is the website you're referring to in your signature?
      {{ DiscussionBoard.errors[8953087].message }}
  • Profile picture of the author Istvan Horvath
    Originally Posted by Krishna876 View Post

    Hope what I'm asking is clear...
    Not really. Is the "text" part of the image or something superposed by html?
    Signature

    {{ DiscussionBoard.errors[8952821].message }}
    • Profile picture of the author Krishna876
      The text is not a part of the image. I guess its superimposed using html. I used a div tag that is formatted in my stylesheet.

      In dreamweaver, it's aligned fine. But when I preview it in any browser, the alignment is off to the left. But when I make the browser narrower by clicking the edge of the browser and dragging it in, the background will stay centered and eventually line up with the text.

      I figure theres a way to use the css sheet to make the text flow with the background and hold it's position.

      Hope that makes sense...

      Originally Posted by Istvan Horvath View Post

      Not really. Is the "text" part of the image or something superposed by html?
      {{ DiscussionBoard.errors[8953102].message }}
  • Profile picture of the author jpweb
    You can create a container with a fixed width that has auto margins (which will allow it to center automatically) If you can link an example, I can fiddle you a fix..
    {{ DiscussionBoard.errors[8953192].message }}
  • Profile picture of the author sham2
    Hello you need to fix the width of your page main container and give margin:auto 0; .
    I you want to text alignment then write this in your css file text-align:justify or left.
    Your image will be in background if you want that text come on background.
    {{ DiscussionBoard.errors[8953498].message }}

Trending Topics