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 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    82
    Thanks
    15
    Thanked 3 Times in 3 Posts

    Difference with screen size

    Hey guys,
    so when I resize a browser screen, certain things are messed up. for instance, if I use text-align: right, whenever I decrease the size of the browser, the text is ALWAYS on the right. Should I use position: relative instead? Are there any drawbacks with using position:relative?

  • #2
    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
    Can we have a link to your page? It's hard to say anything about your page/code without having a glance at it.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder LearningCoder's Avatar
    Join Date
    Jan 2011
    Location
    The Pleiades
    Posts
    922
    Thanks
    76
    Thanked 29 Times in 29 Posts
    Ah I had a very similar problem before. I think I remember the problem to be myself setting the body width to 100% rather than using pixels. I'll post my code here so you can compare your code with mine.

    Code:
    html {background-image: URL("images/backPattern.png");
            background-color: #232210;}
    
    body {width: 1000px;
          margin: 0 auto;}
    As you can see my width is now set using pixels on the body tag, with a margin of auto. Or if you'd like to visit my own Thread relating to this same problem, please visit:

    Restore Down on browser 'squeezing' my website.

  • Users who have thanked LearningCoder for this post:

    Aurora.Light (04-11-2011)

  • #4
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by Aurora.Light View Post
    Hey guys,
    so when I resize a browser screen, certain things are messed up. for instance, if I use text-align: right, whenever I decrease the size of the browser, the text is ALWAYS on the right. Should I use position: relative instead? Are there any drawbacks with using position:relative?
    Of course it's on the right: that's what text-align: right means.


  •  

    Posting Permissions

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