Monday, March 26, 2012
set div width to remaining width of the browser
layout.
<div style="float:left">column 1</div>
<div style="float:right">column 2</div>
then I set the width of the first column to a fixed size:
<div style="float:left; width:10em;>column 1</div>
how can I set the width of the 2nd column, the float:right div, to
fill the remaining space of its container?
I know I can use percentages, but I want the left column to always be
the same fixed length.
Is this a case where <table> is the obvious solution?
thanks,
-SteveDo you need this?
<div style="float:left; width: 10em; border: solid 1px red">
ZZZZZ
</div>
<div style="margin-left: 10em; border: solid 1px green">
www
<div>
> using float: left and float: right to build a two column page
> layout.
> <div style="float:left">column 1</div>
> <div style="float:right">column 2</div>
> then I set the width of the first column to a fixed size: <div
> style="float:left; width:10em;>column 1</div>
> how can I set the width of the 2nd column, the float:right div, to
> fill the remaining space of its container?
> I know I can use percentages, but I want the left column to always be
> the same fixed length.
> Is this a case where <table> is the obvious solution?
> thanks,
> -Steve
>
On Jun 15, 2:00 pm, Yuriy Solodkyy <y.dot.solod...@.gmail.com> wrote:
> Do you need this?
> <div style="float:left; width: 10em; border: solid 1px red">
> ZZZZZ
> </div>
> <div style="margin-left: 10em; border: solid 1px green">
> www
> <div>
>
thank you. I just read of the margin technique in a very good book I
have:
http://www.amazon.com/CSS-Anthology...81932373&sr=8-1
a lot of CSS positioning seems to be a hack. esp if you dont want to
use javascript out of concern of complicating things even further.
I assume CSS does not allow one div to reference another for is
position and size? That would seem to be ideal for page layouts.
( where the height of div a is always the height of div b, div c
always has the same absolute X position of div d, ... )
thanks,
-Steve
set div width to remaining width of the browser
layout.
<div style="float:left">column 1</div>
<div style="float:right">column 2</div>
then I set the width of the first column to a fixed size:
<div style="float:left; width:10em;>column 1</div>
how can I set the width of the 2nd column, the float:right div, to
fill the remaining space of its container?
I know I can use percentages, but I want the left column to always be
the same fixed length.
Is this a case where <tableis the obvious solution?
thanks,
-SteveDo you need this?
<div style="float:left; width: 10em; border: solid 1px red">
ZZZZZ
</div>
<div style="margin-left: 10em; border: solid 1px green">
www
<div>
Quote:
Originally Posted by
using float: left and float: right to build a two column page
layout.
<div style="float:left">column 1</div>
<div style="float:right">column 2</div>
then I set the width of the first column to a fixed size: <div
style="float:left; width:10em;>column 1</div>
>
how can I set the width of the 2nd column, the float:right div, to
fill the remaining space of its container?
>
I know I can use percentages, but I want the left column to always be
the same fixed length.
>
Is this a case where <tableis the obvious solution?
>
thanks,
>
-Steve
>
On Jun 15, 2:00 pm, Yuriy Solodkyy <y.dot.solod...@.gmail.comwrote:
Quote:
Originally Posted by
Do you need this?
>
<div style="float:left; width: 10em; border: solid 1px red">
ZZZZZ
</div>
<div style="margin-left: 10em; border: solid 1px green">
www
<div>
>
thank you. I just read of the margin technique in a very good book I
have:
http://www.amazon.com/CSS-Anthology...81932373&sr=8-1
a lot of CSS positioning seems to be a hack. esp if you dont want to
use javascript out of concern of complicating things even further.
I assume CSS does not allow one div to reference another for is
position and size? That would seem to be ideal for page layouts.
( where the height of div a is always the height of div b, div c
always has the same absolute X position of div d, ... )
thanks,
-Steve
Tuesday, March 13, 2012
Set page stylesheet in code-behind?
<HEAD>
.
.
.
<style type="text/css" media="all">@dotnet.itags.org.import url( TuesdayStyles.css );
</style>
</HEAD>
Is it possible to do this in *code-behind* ? Can you write the <STYLE>
directive into the <HEAD></HEAD> section of the page?
Thanks
Liamin 2.0 it's easier...they have a method just for this.
in 1.1, you can plunk a literal down and use Literal.Text = "aaaaa"
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
"Liam" <Liam@.zzzz.net> wrote in message
news:ORITw$TFGHA.3100@.tk2msftngp13.phx.gbl...
> Let's say we want to change the page style each day:
> <HEAD>
> .
> .
> .
> <style type="text/css" media="all">@.import url( TuesdayStyles.css );
> </style>
> </HEAD>
> Is it possible to do this in *code-behind* ? Can you write the <STYLE>
> directive into the <HEAD></HEAD> section of the page?
> Thanks
> Liam
Karl,
Happen to have the name of that method?
In 2.0? It's under Page.Header.StyleSheet
Page.Header is great in 2.0...check it out:
http://msdn2.microsoft.com/en-us/li...
rs.aspx
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"The Colonel" <colonelangus@.budweiser.com> wrote in message
news:1136832866.985107.80350@.o13g2000cwo.googlegroups.com...
> Karl,
> Happen to have the name of that method?
>
Set page stylesheet in code-behind?
<HEAD>
..
..
..
<style type="text/css" media="all">@dotnet.itags.org.import url( TuesdayStyles.css );
</style>
</HEAD
Is it possible to do this in *code-behind* ? Can you write the <STYLE>
directive into the <HEAD></HEAD> section of the page?
Thanks
Liamin 2.0 it's easier...they have a method just for this.
in 1.1, you can plunk a literal down and use Literal.Text = "aaaaa"
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Liam" <Liam@.zzzz.net> wrote in message
news:ORITw$TFGHA.3100@.tk2msftngp13.phx.gbl...
> Let's say we want to change the page style each day:
> <HEAD>
> .
> .
> .
> <style type="text/css" media="all">@.import url( TuesdayStyles.css );
> </style>
> </HEAD>
> Is it possible to do this in *code-behind* ? Can you write the <STYLE>
> directive into the <HEAD></HEAD> section of the page?
> Thanks
> Liam
Karl,
Happen to have the name of that method?
In 2.0? It's under Page.Header.StyleSheet
Page.Header is great in 2.0...check it out:
http://msdn2.microsoft.com/en-us/li...ad_members.aspx
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"The Colonel" <colonelangus@.budweiser.com> wrote in message
news:1136832866.985107.80350@.o13g2000cwo.googlegro ups.com...
> Karl,
> Happen to have the name of that method?