• 0

Div height problem


Question

8 answers to this question

Recommended Posts

  • 0
  heffer86 said:
This would work, but div1(nav) has a special boarder around it. Any ideas now?

Tables for layout?

haha... I jest... but funny how the thing that once worked flawlessly is now not allowed, and what's meant for 'layout' doesn't work, no?

Yes, I cringe over what once took a few hundred bytes of HTML now takes 1000's of bytes in HTML and nearly as many in CSS stylesheets. And this is supposed to download faster?

I don't know where you come from but I'd rather wait a few seconds for one frame to download than have to wait for 30 seconds or more for a complete CSS layout to download for the current page including all of the content I've already downloaded and cached... but the CSS styles and DIV's don't seem to want to cache... oh well.

  • 0
  sweetsam said:
It will be very helpful to provide a solution if you can post the layout you are trying to code.

Here is my ASP.Net Master page

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">t;html xmlns="http://www.w3.org/1999/xhtml">;head runat="server">
	<title>Untitled Page</title>
	<asp:ContentPlaceHolder id="head" runat="server">
	</asp:ContentPlaceHolder>
	<link href="css/style.css" rel="stylesheet" type="text/css" />




</head>
<body>
	<form id="form1" runat="server">
	<div id="frame">

		<div id="header">
			<div class="float_left"><img src="images/master/ge_logo.gif" alt="" /></div>
			<div class="float_left"><img src="images/master/nav/home.gif" alt="" /></div>
			<div class="float_left"><img src="images/master/nav/learn.gif" alt="" /></div>
			<div class="float_left"><img src="images/master/nav/inspiration.gif" alt="" /></div>
			<div class="float_left"><img src="images/master/nav/transformation.gif" alt="" /></div>
			<div class="float_left"><img src="images/master/nav/about.gif" alt="" /></div>  

			<!-- end header -->   
		</div>
		<div id="nav">
			<div id="nav_content">
				<img src="images/master/nav/garten_center.gif" alt="" />
				<ul>
					&lt;li&gt;&lt;a href="Default.aspx">Annuals</a></li>		&lt;li&gt;Trees, shrubs, persnnials&lt;/li&gt;
					&lt;li&gt;Pavers and Retaining Walls&lt;/li&gt;
					&lt;li&gt;Other Products&lt;/li&gt;
					&lt;li&gt;Pictures&lt;/li&gt;
				&lt;/ul&gt;

				&lt;img src="images/master/nav/landscaping.gif" alt="" /&gt;
				&lt;ul&gt;
					&lt;li&gt;Designing&lt;/li&gt;
					&lt;li&gt;Pictures&lt;/li&gt;
					&lt;li&gt;Pavers and Retaining Walls&lt;/li&gt;
				&lt;/ul&gt;
				&lt;img src="images/master/nav/flower_shop.gif" alt="" /&gt;
				&lt;ul&gt;
					&lt;li&gt;Fresh ideas&lt;/li&gt;
					&lt;li&gt;Christmas&lt;/li&gt;
					&lt;li&gt;Silks&lt;/li&gt;
					&lt;li&gt;Pictures&lt;/li&gt;
				&lt;/ul&gt;
				&lt;img src="images/master/nav/contact_us.gif" alt="" /&gt;
			&lt;/div&gt;
			&lt;!-- end nav --&gt;
		&lt;/div&gt;

		&lt;div id="content_container"&gt;
			&lt;div class="content"&gt;
			&lt;asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"&gt;

			&lt;/asp:ContentPlaceHolder&gt;
			&lt;/div&gt;

		&lt;!-- end Content --&gt;
		&lt;/div&gt;

		&lt;div class="clear"&gt;&lt;/div&gt;
	&lt;!-- end frame --&gt;
	&lt;/div&gt;
	&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;

And the css file

/* global styles */
body {
	color:#6d941a;
	background-color:#83a43c;
	text-align:center;
	background-image:url(../images/patter1.gif);
	background-repeat:repeat;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}

p {
	margin: 0px;
	padding: 0px;
}

ul {
	text-decoration:none;
	margin:0px;
	padding:0px;
	list-style-type:none;
	list-style-position:outside;
	list-style:none;
}

img {
	border-style:none;
}

a:link {
	color:#000066;
	text-decoration:none;
}


#frame {
	width: 915px;
	text-align:left;
	margin-top: auto;
	margin-right: auto;
	margin-bottom: 0px;
	margin-left: auto;
}

#header {
	color:#ffffff;
	text-align:left;
	height: 145px;
	width: 915px;
}


#nav {
	width: 184px;
	height:100%;
	background-position: top;
	float:left;
	background-color:#fffff0;
}


#nav_content {
	padding: 3px;
	border: medium double #6d941a;
	height:100%;
}

#nav_content li.current {
	color: #000099;
	text-decoration:line-through;
	background-color:#000000;
}


#nav li.current {
	color: #000099;
	text-decoration:line-through;
	background-color:#000000;
}



#content_container {
	float:left;
	background-color:#fffff0;
	width:730px;
	height:100%;
}

.content {
	padding: 3px;
	height:100%;
	border: medium double #6d941a;
}

.float_left {
	float:left;
}

.float_right {
	float:right;
}

.clear {
	clear:both;
}

Edited by Joel
  • 0

Just wrap both divs inside a wrapper div, and apply 'overflow:hidden;' on the wrapper, and add 'padding-bottom: 32767px; margin-bottom: -32767px;' to the shorter div.

  sweetsam said:

It's a horrible way of making columns. it's rigid, only works for fixed width. hard to maintain, every time you change the style or width of the column you need to make a whole new image. And it's a waste of bandwidth.

  Regression_88 said:
Yes, I cringe over what once took a few hundred bytes of HTML now takes 1000's of bytes in HTML and nearly as many in CSS stylesheets. And this is supposed to download faster?

I don't know where you come from but I'd rather wait a few seconds for one frame to download than have to wait for 30 seconds or more for a complete CSS layout to download for the current page including all of the content I've already downloaded and cached... but the CSS styles and DIV's don't seem to want to cache... oh well.

What are you talking about? Table layouts take much more space than div layouts. Not to mention the accessibility horrors. And CSS does cache, you only need to download it once, that's the whole point of using external styles.

Edited by Primexx
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Wrong again. Electric vehicles are more reliable than gasoline vehicles because they have fewer points of failure. On average, they last 50% longer. Its your right to be incorrect and my right to correct you.
    • Hello, I am using a Hitron CODA56 cable modem with Comcast Xfinity's 1200 Mbps service.  No issues noted.  I had looked at the Motorola and Netgear options for a cable modem, but neither was available for purchase at the time I upgraded my cable connection. There are multiple models in the Netgear Nighthawk X10 line-up.  I am guessing you have either the the Netgear Nighthawk X10 AD7000 model (R8900) or the Netgear Nighthawk X10 AD7200 model (R9000) model, is that correct?  Both of these only have one gigabit WAN (internet) ports for connection to the modem, all of the remaining ports for the LAN side of things are gigabit Ethernet ports.  The 10GbE port on the devices is meant for connection to local NAS storage.  I suppose you could connect the desktop computer directly to it, although it would still be limited by the gigabit connection between the cable modem and the Netgear residential gateway broadband router. I would suggest looking for a residential gateway broadband router from a company like Asus, Netgear, TP-Link or maybe even Ubiquiti, depending upon budget, that has 2.5Gbps (or faster) WAN and LAN ports.  That would allow you to make full use of the 1.2Gbps connection from your ISP as well as have some room for future growth, speed-wise. Regards, Aryeh Goretsky      
    • Firefox 140.0.1 by Razvan Serea Firefox is a fast, full-featured Web browser. It offers great security, privacy, and protection against viruses, spyware, malware, and it can also easily block pop-up windows. The key features that have made Firefox so popular are the simple and effective UI, browser speed and strong security capabilities. Firefox has complete features for browsing the Internet. It is very reliable and flexible due to its implemented security features, along with customization options. Firefox includes pop-up blocking, tab-browsing, integrated Google search, simplified privacy controls, a streamlined browser window that shows you more of the page than any other browser and a number of additional features that work with you to help you get the most out of your time online. Firefox 140.0.1 fixes: Fixed text contrast issues in the sidebar with some dark themes. (Bug 1971487) Fixed a startup crash experienced by some users caused by DLL injection. (Bug 1973947) Download: Firefox 64-bit | Firefox 32-bit | ARM64 | ~60.0 MB (Freeware) Download: Firefox 140.0.1 for Linux | 64-bit | ~90.0 MB Download: Firefox for MacOS | 127.0 MB View: Firefox Home Page | Release Notes Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Week One Done
      Marites earned a badge
      Week One Done
    • One Year In
      runge100 earned a badge
      One Year In
    • One Month Later
      runge100 earned a badge
      One Month Later
    • One Month Later
      jfam earned a badge
      One Month Later
    • First Post
      TheRingmaster earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      575
    2. 2
      ATLien_0
      183
    3. 3
      +FloatingFatMan
      178
    4. 4
      Michael Scrip
      134
    5. 5
      Xenon
      119
  • Tell a friend

    Love Neowin? Tell a friend!