Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Lee Hughes
8,380 PointsStrange behaviour
I've been asked to convert a static HTML website to WordPress. This is the static website http://tmforwomen.co.nz/
While I'm doing well, I'm getting strange behaviour which I can't work out.
http://meditation.wphostinghub.net/ - this is my demo site where I'm converting it.
As you can see the contact section has a border wrapping around it which I don't what why this is happening. The border size is also bigger on my demo site when the code is exactly the same.
Any ideas on how to fix this?
Thanks
2 Answers
Joshua Briley
Courses Plus Student 24,645 PointsYou're using an HTML5 Doctype on the newer version, as opposed to the older HTML 4 Transitional Doctype on the original. This will definitely cause some changes in your styles.
Regarding the menu stylings, it looks like you're getting some wonkiness from the following declaration:
border-width: 0 0 1 0;
Consider changing that to:
border-width: 0 0 1px 0;
Kevin Kenger
32,834 PointsHey Lee,
The site looks great so far! It looks like <td> tag that contains the "Contact" link has a different class than the other links. Its class is menu3 while all the others are menu1. Presumably the styles for menu3 are what's causing the weird borders.
Joshua Briley
Courses Plus Student 24,645 PointsI thought this may be the case. But, the original site uses the same class structure.
Lee Hughes
8,380 PointsThe code is exactly the same but it was due to the doctype versions.
Thanks for your help though :)
Kevin Kenger
32,834 PointsWell you're very welcome, but I'm sorry I wasn't of any help!
Lee Hughes
8,380 PointsLee Hughes
8,380 PointsBingo! Thank you.
Kevin Kenger
32,834 PointsKevin Kenger
32,834 PointsYeah good catch dude! +1