Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: A css problem?

  1. #1
    New Coder
    Join Date
    Feb 2009
    Location
    Mosjøen, Norway
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post A css problem?

    - [ Problem Solved, thanks: Excavator ] -


    Hi there!

    I've been requently browsing CodingForums in the past, but, never really registered before, but, I've gotten a lot of good and helpfull advise from these forums in the past.

    Putting the formalities aside, I've run into a somewhat annoying problem these past few hours and no matter what I seem to do, will fix it.

    Generally it's about time I changed from the standard TABLE layouts and went over to DIV's so please keep in mind that this is my first real attemp to try and make something half-assed with DIV's.

    Onto the problem ->

    For the past few hours I've been trying to align 2 div's and it all looks good in most browsers, besides the horrendus Internet Explorer. You know how nested TD's in table layouts tend to slip down to the center of the page when valign="top" isn't set? That's currently what's bothering me with these DIV's.

    I can't explain it well, so, here's the source on my private web-server.
    http://mental.doesntexist.com/index.php (It's still just HTML, no PHP code added yet.)
    http://mental.doesntexist.com/style/main_style.css

    I'm at a loss here, so, I'm really looking forward to some constructive replies I can learn from.

    Cheers,
    - Arnt.
    Last edited by Mentally; 03-01-2009 at 01:20 AM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Have you tried the order it's presented? Like this -
    Code:
    	
    	<div id="main">
    		<div id="main_left_top">Latest News</div>
    		
    		<div id="main_right_top">
    			<ul>
    				<li><a href="#">Latest Items</a></li>
    				<li><a href="#">Latest Raids</a></li>
    			</ul>
    		</div>
    		<div id="main_left_body"></div>
    		
    		<div id="main_right_body"></div>
    	</div>
    	<br style="clear: both;">

    If mixing the order up bothers you, you can try containing left elements in an actual left column. Like this - http://nopeople.com/test/mentally.html
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New Coder
    Join Date
    Feb 2009
    Location
    Mosjøen, Norway
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Excavator, you're now my hero!

    It never really occurd to me that I could flip the order like that to sort it out. Guess I just needed another set of eyes.

    It fixed my problem like a charm to be honest with you!

    Really, thanks a bunch.

    Cheers,
    - Arnt.


  •  

    Tags for this 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
    •