Results 1 to 2 of 2

Thread: Resizing content with % instead of px?

  1. #1
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Resizing content with % instead of px?

    Hi there!

    I am tweaking a WordPress template to fit a blog for a roleplaying game. The template is a three-column, fixed-width one. It looks fine on my tiny 17" monitor at work, but at home on my 22", the blog is very small and sits in the center of the page. (The content section is just 904px wide.)

    Is there a way to tweak the style.css file in order to give the columns percentage widths instead of absolute pixel widths, so that the center "content" area will resize properly according to the reader's resolution/monitor size/window size?

    I have some experience with CSS and I'm usually pretty good at tweaking pre-existing CSS to fit my needs, but this is something that's a bit beyond me.


    http://ishadowran.wordpress.com/ is the blog's URL.


    Thank you!

  2. #2
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    My advice is to try it.

    What I normally do is to declare the width of the main tag, eg <table>, as 100% in my CSS file.

    I then declare the columns, eg <td>, as width =%, like this width:50%; also in my CSS file.

    The thing is to make sure that these column percentages add up to 100.

Bookmarks

Posting Permissions

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