You are currently viewing the BOOK: Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages ISBN: 978-0-470-12448-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I'm using the book as a tutorial into the world of CSS and ASP.NET. I'm using VS 2005 and have been following along pretty well so far.
I got to Chapter 4, where we first put the logo images and the CSS together and create a visible web page/site.
The IDE displays the site using IE, which seems to work find. However, when I tried to view the site using SeaMonkey (1.1.7), the logo image is not centered. These are the DIVs for "headerGraphic" and "navigationArea".
Note that the content for the DIVs "bodyArea" and "footerArea" are centered.
I tried changing the text-align element of the "body" CSS block to "left" and "right", both had an effect on the "bodyArea" and "footerArea" content, but not the "headerGraphic" and "navigationArea" content.
I was hoping to learn to use CSS in a way that would work across many different browser types. Can you provide any help?
I tried to include the content of the CSS and HTML files, but was told by the application that I cannot post content which includes URLs. Please let me know how you would like me to show you the files with which I'm working.
As a follow-up, I asked the same question in a SeaMonkey support group and was told that the CSS styles for both the "headerGraphic" and "navigationArea" blocks had nothing to cause them to be centered, and that I needed to add:
to each. Once I did this, the content was centered when viewing using the SeaMonkey browser.
Why does IE center this content without the above margin settings?
By the way, I couldn't find any settings in the "Style Builder" UI to cause these settings, so I had to set them in the file by hand.
Why does it take a "margin" setting to cause content to be centered anyway? I sure hope this CSS stuff begins to make sense to me someday ;-
And yet another follow-up. I see that you cover this issue at the end of that chapter (in the section named Browser Check).
First, I wish you had mentioned this earlier - like before we would have run the first example.
Second, in that section, you mention that the Gecko-based browsers are more standards compliant than IE. I wonder then why you write code that will work in IE but not the other browsers - then have to "fix" the code to work in all browsers?
Perhaps this was just your way of pointing out the problem?
In any case, I was very happy to find that you addressed the issue in the book.