CSS question [solved]

C++, C#, Java, PHP, ect...
Post Reply
alexrules01
Posts: 175
Joined: Sun Oct 11, 2009 9:33 am

CSS question [solved]

Post by alexrules01 »

I am starting on one of my more older games that I stopped ages ago, and have just got the CSS to where I want it (basic, but gives a rough idea). But when I go through from page to page, the pages slightly alter, like the menu bar moves or the healthpoint bar image doesnt line up behind the text, but on another page it does.
I am linking the stylesheet to all the pages so they are exactly the same, or, well so i thought. I will try and post some screenies soon.
Btw I am using IE, which may be the problem? :)
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: CSS question

Post by Jackolantern »

Without seeing anything, and as long as you are sure there is absolutely no CSS embedded on any of the pages, it sounds like a content issue. Just because the same CSS file is linked to more than 1 page doesn't mean they will be identical. CSS is designed to work with the flow of HTML content, and that means more content here or there could push things around a bit. Sometimes it does just take some good old fashioned tweaking. But then again, sometimes it doesn't. While I understand on wanting to get the healthbar to line up, how critical is it that the menu is pixel perfect between pages? Most users aren't going to be pulling out magnifying glasses to inspect your page the way you are when you are designing it. It is quite common to have some discrepancy on pages even on the largest sites in the world (particularly if they are using dynamic user-created content), just as long as text is not running out of its border, things aren't overlapping, etc.
The indelible lord of tl;dr
alexrules01
Posts: 175
Joined: Sun Oct 11, 2009 9:33 am

Re: CSS question

Post by alexrules01 »

Fair enough, i'll leave the looks until later. I tried it in Safari aswell, and while the hp image bars didnt line up, all the divs stayed in the same place from page to page.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: CSS question

Post by Jackolantern »

Strange. I am no CSS whiz. I can format what I need to format, but I am no artist with it. Maybe if you have some specific bits that are causing you trouble you can post the code and some screen shots and some of the more design-inclined around here can help out.
The indelible lord of tl;dr
User avatar
62896dude
Posts: 516
Joined: Thu Jan 20, 2011 2:39 am

Re: CSS question

Post by 62896dude »

Yep, exact same thing happened to me for a while, post your code for one page, any page that is causing you trouble, and your entire style.css - from there I think I can help you get it working right :)
Languages: C++, C#, Javascript + Angular, PHP
Programs: Webstorm 2017, Notepad++, Photoshop
Current Project: HP Destiny
alexrules01
Posts: 175
Joined: Sun Oct 11, 2009 9:33 am

Re: CSS question

Post by alexrules01 »

I fixed it! It was my stupid self, when I was adding code from other pages and deleting some, I either didnt copy over or deleted the div id tag, so it wasnt being affected by it. My bad
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: CSS question [solved]

Post by Jackolantern »

Always nice when you realize it is a 2 second fix rather than a long haul of tweaking lol :)
The indelible lord of tl;dr
Post Reply

Return to “Coding”