Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!

Website programming question

CronusCronus Registered User regular
I'm currently making a website for my game. It is nothing fancy, and I'm just using CSS and HTML, but I have one problem that I can't fix well. I have some pages that don't fill some monitors. I use the <div class=""></div> tags to create separate text areas, and want to know if there is a way to make it so that my page always fills the screen as it looks very ugly with the bottom of the screen just being the background.

I don't even know if this is possible, but any help would be greatly appreciated as google and the HTML/CSS reference sites I use have failed me with this.

Thanks.

Cronus on
camo_sig.png
"Read twice, post once. It's almost like 'measure twice, cut once' only with reading." - MetaverseNomad

Posts

  • SeguerSeguer Registered User regular
    width: 100%

    ?

    Can you provide an example?

  • JasconiusJasconius bird internet Saint Petersburg RussiaRegistered User regular
    Browsers can't stretch text vertically, and if they could, it would be worse than whatever your dealing with now.

    In your first div you can do style="margin-top : ##px;"

    To make it how hug the top of the screen, but thats it.

  • SzechuanosaurusSzechuanosaurus Registered User, ClubPA
    If you have multiple columns of text, there's a CSS trick to make all the columns the same length. Like, if the background colour of the columns was grey, you can make it so that they all stretch down to the length of the longest column, even if the text doesn't stretch all the way in all of the columns. Makes things look a bit tidier.

    Not sure if that's what the OP wants to do or not though.

  • CronusCronus Registered User regular
    If you have multiple columns of text, there's a CSS trick to make all the columns the same length. Like, if the background colour of the columns was grey, you can make it so that they all stretch down to the length of the longest column, even if the text doesn't stretch all the way in all of the columns. Makes things look a bit tidier.

    Not sure if that's what the OP wants to do or not though.

    No thats not it. It's that I have a div with a small amount of text that I want to stretch to the bottom of the screen so that the text box is displayed and not the background. If there is no way to stretch the box, I can hack around it. That is not a problem.

    Thanks.

    camo_sig.png
    "Read twice, post once. It's almost like 'measure twice, cut once' only with reading." - MetaverseNomad
  • SeguerSeguer Registered User regular
    I'm having a hard time envisioning what you're trying to describe. Can you provide an example of a page? (And sorry to be harsh, but describing to us with commas?)

  • SeñorAmorSeñorAmor Registered User regular
    What about using Javascript to get the height of the window and adjusting your div appropriately?

    $('#you').appendTo('#compton').css('color', 'white');
    
  • SzechuanosaurusSzechuanosaurus Registered User, ClubPA
    Can't you just do height: 100% ? Or does that not work that way?

Sign In or Register to comment.