[thelist] CSS & DIV rendering trouble

Emma Jane Hogbin emmajane at xtrinsic.com
Mon Mar 3 18:29:02 CST 2003


On Mon, Mar 03, 2003 at 06:27:06PM -0500, burgan at iprimus.com.au wrote:
> I have a 'div' tag that I want to have a height of 1 pixel - in order to
> create a line across my page.

Lines are good. :) But I'm not sure what the context of the whole design
is going to be. As someone else has mentioned you could use an hr to
create a line. The question is though: why do you want the line?
	separate sections: use an "hr" element
	add decoration to a shape/block of content: use a CSS border

In your web page you have a red picture that creates an equally long line
as the div background above. What is it that you'd like to accomplish?
Should it be a black line and then a red line right underneathe?

Instead of wrapping the table in a div, I'd recommend just adding a
border-top to the table. Like this:

.menubar_line {
	border-top: 1px solid #000;
	width: 700px;
}

then in your page:

<table class="menubar_line">
<tr><td>
content goes in here.
</td></tr>
</table>

> The div tag appears to have a height of around 20 pixels or so .. how do I
> get it just to 1px like I want it.

Can you draw a picture in photoshop (or similar) that shows what you would
like the page to look like? Then we can build the HTML and CSS to match
your desired effect.

emma

--
Emma Jane Hogbin
[[ 416 417 2868 ][ www.xtrinsic.com ]]



More information about the thelist mailing list