+ Reply to Thread
Results 1 to 8 of 8

Thread: little help

  1. #1
    garryms is offline x10Hosting Member garryms is an unknown quantity at this point
    Join Date
    Mar 2010
    Location
    United Kingdom
    Posts
    19

    Smile little help

    I'm still in the process of my first website using Dreamweaver. I wanted that when I view it in a browser, it would automatically fit at the middle of the screen(it's on the left side as of now). How can I do that? Appreciate your input on this. Thanks...

  2. #2
    calistoy's Avatar
    calistoy is offline Free Support Volunteer calistoy is just really nice
    Join Date
    Aug 2008
    Location
    USA
    Posts
    5,598

    Re: little help

    Is there no option to center it in dreamweaver?

  3. #3
    garryms is offline x10Hosting Member garryms is an unknown quantity at this point
    Join Date
    Mar 2010
    Location
    United Kingdom
    Posts
    19

    Re: little help

    yes. it's either absolute, relative, fixed or static positioning but i'm struggling... I wanted to be always in the center just like this forum page...

  4. #4
    lukoot is offline x10 Sophmore lukoot is an unknown quantity at this point
    Join Date
    Mar 2010
    Posts
    120

    Re: little help

    give this a try im sure i had the same problem some time ago and i think thats what i done

    Put <center> directly under the <body> tag. Then, put </center> directly above the </body> tag.
    Last edited by lukoot; 05-14-2010 at 01:34 PM.
    Thanks to visha2 for escalating my last problem and thanks to Ashley for fixing it

  5. #5
    garryms is offline x10Hosting Member garryms is an unknown quantity at this point
    Join Date
    Mar 2010
    Location
    United Kingdom
    Posts
    19

    Re: little help

    hi,
    I did what you told me but it is still positioned in the left side of the screen...
    thanks for your help...

  6. #6
    lukoot is offline x10 Sophmore lukoot is an unknown quantity at this point
    Join Date
    Mar 2010
    Posts
    120

    Re: little help

    hi
    just to check you didn't do this ?
    </center>
    <body>
    <center>
    Thanks to visha2 for escalating my last problem and thanks to Ashley for fixing it

  7. #7
    smithee's Avatar
    smithee is offline x10Hosting Member smithee is an unknown quantity at this point
    Join Date
    Aug 2009
    Location
    NIMBY
    Posts
    45

    Re: little help

    Have you ever used DIVs? These allow you to divide your page with invisible boxes and you can style them to how you wish. So in your case, wrap the content with a DIV tag, and style its margin and width:

    HTML Code:
    <div style="width:200px; margin:auto;">
    <p>Hello world.</p>
    <p>Replace the content here as you wish. Notice that if the text is too big to fit on one line, it will automatically start a new one!</p>
    </div>
    Simple as!

    You can even give it a "class", then it can be referred to separately. Dreamweaver lets you do that fairly easily. Try this:
    1. Highlight the page content you wish to be in the centre of the page
    2. Insert > Layout Objects > Div Tag
    3. Make sure "Wrap around selection" is selected, and click "New CSS Rule"
    4. Underneath "Choose a contextual selector type for your CSS rule", select "Class". Give it a name of "middle", and select "This document only". Click OK.
    5. Click on Box, then type in a width of your choice. In the Margin section, clear the "Same for all" check box, and select "auto" for left and right. Click on OK twice.

    Have a look at the code it's produced and see if you can understand it. The advantage of using this method is that by simplying entering "middle" as a class for any div tag, it will be automatically assigned to the properties stated towards the top of the page.

    One more thing... try to give a better subject for a thread. So instead of "little help", try "Centre section in Dreamweaver". That way, the right people will be able to look at just the title and know exactly what to do.
    .

    Be nice to nerds. Chances are you’ll end up working for one. - Bill Gates

  8. #8
    garryms is offline x10Hosting Member garryms is an unknown quantity at this point
    Join Date
    Mar 2010
    Location
    United Kingdom
    Posts
    19

    Smile Re: little help

    I was able to fix it. I went over the book and just set the CSS Rule Positioning Type to Relative. It will now position the page at the center of the screen.

    Lukoot: I put the right code, it did not solve the problem but it help me in other way.

    Smithee: I'll take your advice. Next time I'll put a more descriptive subject.

    Thanks for you help guys...

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers