Forum Moderators: open

Message Too Old, No Replies

Content with a border alignment problem.

         

nickd61

3:16 am on Oct 13, 2007 (gmt 0)

10+ Year Member



HELP! I am new to Web development and have hit an issue I can't resolve. My issue occurs when putting a border around a content area on a page. Everything is sweet in IE but in testing with Firefox I hit problems.

As soon as I apply a border to a 'content area' on a page the content loses central alignment and moves to the left of the screen. If I take the border out (in bold) the text etc aligns to center correctly. Iwas originally using css for this but have moved this inline to try helping with finding the problem.

IE presents correctly but Firefox aligns the text to the left. I don't know if it matters but the content is created with a GridView control.

<div style=" position:relative;
height: 700px;
width: 516px;
padding: 5px 0 0 5px;
border-style: solid;
border-color: maroon;
border-width: 4px;
min-height: 687px;

overflow: auto;
text-align:center;
margin: 0 auto;">

<div style="
font-size: large;
color: Black;">
<b>Heading Text</b>
</div>

<asp:GridView
runat="server"
PageSize="30"
GridLines="None"
id="grdvwLeagueLadder"
AutoGenerateColumns="False"
DataSourceID="Member"
AllowPaging="True">

Marshall

8:53 pm on Oct 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi nickd61. Welcome to WebmasterWorld.

What doctype are you using and what in the content <div> contained in?

Marshall