Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2007
    Location
    Liverpool
    Posts
    311

    Default Web Pages Width Question

    I'm just wondering a) how you set the width of a web page to like 900px so people with older monitors can see the page without the scrollbar at the bottom of the page and b) how do you set a web page so the images etc are displayed in generally the same width (e.g. If I were to create an image to go above one of the main paragraphs of my webpage, and it was designed to match the width of the border to the paragraph, how would I make sure that this stayed consistently in all browsers?)

    Thanks.

  2. #2
    Join Date
    Nov 2006
    Location
    Manchester
    Posts
    2,642

    Default

    If you use tables you can set the width of each column to be a percentage of the screen - that way it will resize itself to fit on almost any screen. For example, my site has 15% for the left column, a 1% gap, 66% for the main window, another 1% gap and 15% for the right pane. If you resize your browser it will resize each of the columns.

    If you're not using tables then text should automatically wrap to the size of the page (example). You can't (as far as I know) have the browser automatically resize an image - if you want it to be the same width as the text then you'll have to define the width of the text within a table and size the image accordingly - just under 800px if you want to be absolutely inclusive or just under 1024 if you want to include most users. Alternatively, if you can you make the image's background colour the same as the page's (or cell's) background colour and then centre align it - that way no one will know where the image ends and the background begins.

    I'm sure there are more complicated and more straightforward answers out there but that's how I'd do it.
    Dennis, Francois, Melba and Smasher are competing to see who can wine and dine Lola Whitecastle and win the contract to write her memoirs. Can Dennis learn how to be charming? Can Francois concentrate on anything else when food is on the table? Will Smasher keep his temper under control?

    If only the 28th century didn't keep popping up to get in Dennis's way...

    #dammitbrent



    The eleventh annual Brenty Four serial is another Planet Skaro exclusive. A new episode each day until Christmas in the Brenty Four-um.

  3. #3
    Join Date
    Jul 2007
    Location
    Liverpool
    Posts
    311

    Default

    Thanks Lis... cos the only problem with My Family Online is that I just couldn't *get* columns to work at all, whatever I did it just looked naf, so in the end I settled for trying to get the web page content in the center with a good width of main content, the main content is defined within the CSS Style Code right at the top of the page.

    I'm not the most experienced web designer in the world, but I would say I'm pretty good now compared to the point I was at least year (didn't even know what HTML stood for ) i.e... knowing nowt..

    Here's a piece of coding from the main page (hope I'm OK to post this)

    html { background: #909090 ; color:#000; font-family:"Helvetica", "Arial", "Bitstream Vera Sans", "Verdana", sans-serif; font-size:93.3%; margin:0; padding:0;}
    body {background:#909090; color:000; font-family:"Trebuchet MS"; font-size: 94%; margin:50; padding: 0;}
    I was just experimenting when I created this part about three or four weeks ago, so when I did "margin: 50" and it put the web page into the center, I was a happy bunny...

  4. #4
    Join Date
    Dec 2006
    Location
    Oxford, UK
    Posts
    635

    Default

    Lissa - you should really be using div tags and CSS rather than tables, but the principle's more or less the same.
    We ride tornadoes. We eat tomatoes.

  5. #5
    Join Date
    Jul 2007
    Location
    Liverpool
    Posts
    311

    Default

    One thing that's bugging me - Columns? I know the coding and everything but there's always something that goes wrong e.g. text increases, page goes all wierd etc.

  6. #6
    Join Date
    Jul 2007
    Location
    Liverpool
    Posts
    311

    Default

    Probably just freewebs playing silly buggers... but surely if you specify <table width="800" align="center"> *that* will be the width of the body? Cos atm, I'm getting this thing where theres a massive white space and a small gray border, but the text seems to keep to the ' width="800" '...

    ... god I'm confused...
    Tom Simpson
    My Top Three: "The War Games", "The Caves of Androzani" & "Time-Flight".

Similar Threads

  1. Now with Extra Width
    By Philipnet in forum Announcements and Feedback
    Replies: 20
    Last Post: 6th Nov 2013, 1:51 PM
  2. Cached pages
    By MinaHarker in forum Mr Smith, I Need You!
    Replies: 11
    Last Post: 5th Jul 2010, 6:48 AM