Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Some CSS help

Name: Mellow 2011-11-21 15:38

Yo /prog/
I've got some basic CSS problem that I'd love help with
At the moment I've got one div for a main area that I'd like the rest of my content in, and then have 3 divs for my content (left navigation, middle content, right information, all floating left). However, I have trouble configuring my main area (I want to enclose everything in a border). I can set the width because it's static, but I the height is dynamic depending on the amount of content. However, I can't find a way to do this correctly.
If I don't fill in the height property, the main area div has a height of 0px since it has no content in it. If I set the height property to 100%, the height of the main area is always the size of your browser or something so if you have too little or too much content it's ass.
I've probably made some design mistake (unless I'm missing some obvious CSS property), how would I go about unfucking this?

Name: Anonymous 2011-11-21 15:39

dont post your code, or else we might be able to help you...

Name: Anonymous 2011-11-21 15:40

Your description is horrible. I can barely understand what you're saying. Post the code on pastebin, or better yet a link to what you currently have, ``Faggot''.

Name: Mellow 2011-11-21 15:43

Ok it's like this
<div class="mainarea">
<div class="left">
*insert content*
</div>
<div class="middle">
*insert content*
</div>
<div class="right">
*content*
</div>
</div>
with
left, middle, right
{float=left;}
and all have set widths
and
mainarea
{width=1000px;border-style=solid;margin-left=auto;margin-right=auto;}
Hope that's enough code

Name: Anonymous 2011-11-21 15:47

>>4


.mainarea {
  min-height: 600px;
}


Pick up a book on CSS.

Name: Mellow 2011-11-21 15:53

>>5
That doesn't work, because if there is too much content the main area won't stretch all the way to the bottom

Not going to pick up a book on CSS just for this, I've got plenty of programming experience and just can't fix this

Name: Anonymous 2011-11-21 15:56

>>6

Did you try it? Because min-height != height.

If you can't fix something as simple as this, you don't have any experience at all. Don't delude yourself.

Name: Mellow 2011-11-21 15:58

http://mellowlicious.hostei.com/
Check it out yourself
css is located at
http://mellowlicious.hostei.com/standard/main.css though it's mostly a mess because I've mainly been testing and trying shit out

And yes I do have experience, just not with web programming. Which is why I'm doing this.

Name: Anonymous 2011-11-21 16:01

>>8

Can't see the HTML. I get redirected to an "under admin review" page. Format your CSS better, also.

Name: Mellow 2011-11-21 16:03

>>9
Oh what the fuck, they did that shit the second I posted the link there
And yeah I know my CSS is a mess, I've mainly been doing random shit to experiment. My php files are formatted even worse.
Thanks for the help anyway

Name: Anonymous 2011-11-21 17:14

>>10
PHP always comes out looking like tripe on a bike.

Name: Anonymous 2011-11-21 17:15

Name: Anonymous 2011-11-21 21:19

http://www.flownet.com/ron/css-rant.html

tl;dr: JUST USE TABLES, and add CSS for styling.

Name: Anonymous 2011-11-21 23:40

>>13
Use cascading style sheets for styling? What a country!

Name: F r o z e n V o i d !!mJCwdV5J0Xy2A21 2011-11-22 3:47

Name: Anonymous 2011-11-22 7:11

At first using CSS for layouts is more difficult than using tables but when you really know the quirks of CSS it becomes more powerful than tables. Don't bother trying to make it work in IE6 or IE7. IE7 has a broken stacking layer and IE6 doesn't even support all the basics of CSS.

There is also a new layout model for CSS in the works -- Flexible Box Layout Module (http://www.w3.org/TR/css3-flexbox/), which addresses the quirks of CSS.

Remove the break after your header. Use margin or padding properties create space instead.

I made a snippet to how you may want to structure this:
http://pastebin.com/y9gyPY2W

I hope that helps.

Name: Anonymous 2011-11-22 9:11

>>15
You are stupid and pathetic.

Don't change these.
Name: Email:
Entire Thread Thread List