Solved

CSS Layout Problems

Posted on 2013-02-02
10
261 Views
Last Modified: 2013-02-23
Hey guys,
I'm almost finished building this website, but there's one thing holding me up. I've tested the site on several different browsers and resolutions, but there's one that's not working right.

Please visit www.mwebdev.com/awm.html and look at it in Chrome or Firefox (it even works perfectly in IE on some machines).

Now look at www.mwebdev.com/downloads/awm-ie.jpg. This is a screenshot of the issue I'm facing. You can see the text in the top right is way further to the right than it should be. And the menu links are skewed as well. This is in IE8.

Can someone point me in the right direction as to what changes I need to make? Thanks in advance!
0
Comment
Question by:isaacr25
  • 4
  • 4
  • 2
10 Comments
 
LVL 16

Expert Comment

by:HagayMandel
ID: 38848222
Since it's a Drupal 7 site, what theme are you using?
0
 
LVL 25

Expert Comment

by:Kyle Hamilton
ID: 38848719
The problem occurs in IE7 not IE8. You sure you want to support IE7. Nobody uses it anymore.
0
 

Author Comment

by:isaacr25
ID: 38848720
It's a custom theme that I designed and built.
0
 

Author Comment

by:isaacr25
ID: 38848722
It actually happens in one of my IE 8 browsers as well.
0
 
LVL 25

Assisted Solution

by:Kyle Hamilton
Kyle Hamilton earned 350 total points
ID: 38848732
Maybe if you have it set to quirks mode or something.. in which case don't expect anything to work like you intended.

The problem that I see is that your html structure doesn't reflect the order of the way the elements appear on the page, which means you have to do odd CSS to make it look like it does. That is the root of the problem. Are you willing to rewrite the html for the #top-row?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 16

Assisted Solution

by:HagayMandel
HagayMandel earned 150 total points
ID: 38848750
kozaiwaniec is right!
Since it's a custom theme, make sure that your template files (page.tpl & node.tpl) generate code orderly, so you will not have to use all that floating and compensating css such as in the <div class="main-menu">:

position: absolute;
float: left;
padding: 10px 0 0 0;
margin-top: 168px;
width: 981px;

Open in new window

if you remove from the above both the position & the margin-top instructions, you'll get the same result!!.
Simply make sure that you render the output one component after another, and have each of them use it's CSS, and the rest will be done by the browsers.

Good luck

Hagay
0
 
LVL 25

Accepted Solution

by:
Kyle Hamilton earned 350 total points
ID: 38848787
I rewrote your top-row so it makes more sense.
http://candpgeneration.com/EE/profoundworks/index.html

It works across all browsers now.

<div id="top-row">
                <div class="masthead">
                    <div class="logo">
                        <a href="/awm/"><img src="http://www.profoundworks.com/awm/themes/profound/images/logo.png" alt=""/></a>
                    </div>
                    <div id="block-block-2" class="byline">
                        <p>Over 70 years of experience you can trust</p>
                    </div>
                </div>
                <div class="main-menu">
                    <ul id="main-menu">
                        <li class="menu-218 first active"><a href="/awm/" title="" class="active">home</a></li>
                        <li class="menu-377"><a href="/awm/services" title="">our services</a></li>
                        <li class="menu-378"><a href="/awm/about" title="">about our firm</a></li>
                        <li class="menu-379 last"><a href="/awm/contact" title="">contact us</a></li>
                    </ul> 
                    <div id="block-block-1" class="contact">
                        <p><img src="http://www.profoundworks.com/awm/themes/profound/images/icon-phone.jpg" />call us at 1 478 742 1889</p>
                    </div>
                </div>
            </div>

Open in new window

I'm also attaching the revised CSS file
style.css
0
 

Author Comment

by:isaacr25
ID: 38848852
You guys are great. I'm on the road at the moment, but I'll be home in a couple of hours and I'll look at what you've sent. Thanks!
0
 

Author Comment

by:isaacr25
ID: 38849237
kozaiwaniec,
Can you point out the things you changed in the top-row code? The rendered code looks different from the source php code (naturally), and I'd like to know the different things you changed so I can apply them for future sites. I've attached the front page (php source) for comparison.
page--front.tpl.php
0
 
LVL 25

Expert Comment

by:Kyle Hamilton
ID: 38849515
hi isaac,

you need to make sure the template renders the structure i posted above. your php template refers to other functions that will also need changing. i cant help you with the code right now cause im out.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
HTML page and JavaScript 2 50
WEB Farm 6 24
Login area of a page 4 19
Change month dropdown 5 15
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now