Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mal

macrumors 603
Original poster
Jan 6, 2002
6,252
18
Orlando
I'm having trouble with one of the sites I run, one page particularly. I've got titles on divs (which are float left and right to place them next to each other) which are supposed to be center aligned, but they are falling left aligned. I can't figure out why, and I'm probably making the whole page far more difficult than necessary, so if anyone has any suggestions, please pass them on. I know this is a commercial website, but my main job isn't really doing this, and I'm essentially still an amateur.

The page is http://www.connectingpt.com/sales.php, and the css is at http://www.connectingpt.com/default.css.

jW
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
Remove the width and position property from .label selector. Do you have Firebug? You can kind of see what's going on with the CSS using it.
 

Denarius

macrumors 6502a
Feb 5, 2008
690
0
Gironde, France
I'm having trouble with one of the sites I run, one page particularly. I've got titles on divs (which are float left and right to place them next to each other) which are supposed to be center aligned, but they are falling left aligned. I can't figure out why, and I'm probably making the whole page far more difficult than necessary, so if anyone has any suggestions, please pass them on. I know this is a commercial website, but my main job isn't really doing this, and I'm essentially still an amateur.

The page is http://www.connectingpt.com/sales.php, and the css is at http://www.connectingpt.com/default.css.

jW

Not sure I get which part you mean, do you mean the nav menus?
 

Mal

macrumors 603
Original poster
Jan 6, 2002
6,252
18
Orlando
Angelwatt, thanks again, but your solution is only partly accurate. In trying to fix the issue you mentioned, I discovered a more important reason I was having trouble. .label is defined twice in my css file. Heh.

Unfortunately, it didn't work. I did, however, get it fixed by increasing the width to the proper size. I had it too small.

jW

BTW, does anyone have any suggestions for a better way to manage this type of layout? It's essentially a grid. I didn't really want to have a table layout used for that, though, even though I know I could make it work.
 

Denarius

macrumors 6502a
Feb 5, 2008
690
0
Gironde, France
Angelwatt, thanks again, but your solution is only partly accurate. In trying to fix the issue you mentioned, I discovered a more important reason I was having trouble. .label is defined twice in my css file. Heh.

Unfortunately, it didn't work. I did, however, get it fixed by increasing the width to the proper size. I had it too small.

jW

BTW, does anyone have any suggestions for a better way to manage this type of layout? It's essentially a grid. I didn't really want to have a table layout used for that, though, even though I know I could make it work.

Personally I like it. I don't really know of anyone using tables to make their page layouts any more since they're so inflexible when it comes to making changes. The only thing I'd consider is that, because you have quite big differences in the page layout for each page, but common things as well, I'd think about separating CSS into

default.css (common stuff applicable to all pages)
sales.css (stuff applicable only to sales)
home.css (stuff applicable only to home)
and so on.

Just slightly easier to manage in terms of locating the relevant styles IMO, but that's just me.
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
I did, however, get it fixed by increasing the width to the proper size. I had it too small.
That was partly why I suggested Firebug so you could see it was narrower, depending on how you wanted to fix it. With CSS, there's definitely more than one way to skin a cat.
BTW, does anyone have any suggestions for a better way to manage this type of layout? It's essentially a grid. I didn't really want to have a table layout used for that, though, even though I know I could make it work.

Take a look at YUI Grids CSS. Might get after what you're wanting.
 

Mal

macrumors 603
Original poster
Jan 6, 2002
6,252
18
Orlando
That was partly why I suggested Firebug so you could see it was narrower, depending on how you wanted to fix it. With CSS, there's definitely more than one way to skin a cat.

Yeah, I just hate Firefox. I'll have to start using that though.

Take a look at YUI Grids CSS. Might get after what you're wanting.

Hmm, sounds interesting. Will look into it.

jW
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
Yeah, I just hate Firefox. I'll have to start using that though.

There is a Firebug lite for Safari, Opera, IE, and Safari's developer tools is comparable too so I recommend it as well if Safari is your preferred browser.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.