Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 2, 2010, 08:45 PM   #1
Mal
macrumors 603
 
Mal's Avatar
 
Join Date: Jan 2002
Location: Orlando
Centered text... not centering?

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
__________________
The Bearded Nerd
13" MacBook Pro; 64GB iPod touch
"It's a real burn, being right so often."
NoiseTrade.com/Walker
Mal is offline   0 Reply With Quote
Old Feb 2, 2010, 08:55 PM   #2
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: 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.
angelwatt is offline   0 Reply With Quote
Old Feb 2, 2010, 08:55 PM   #3
Denarius
macrumors 6502a
 
Denarius's Avatar
 
Join Date: Feb 2008
Location: Gironde, France
Quote:
Originally Posted by Mal View Post
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?
__________________
-MacBook Pro 15" 2.2GHz Santa Rosa 4GB 320gb 7200rpm (slightly dented from having a shelf land on it and from a rather unfortunate tumble from the table)
-OS 10.5.8 (XBench score 134)
Denarius is offline   0 Reply With Quote
Old Feb 2, 2010, 09:01 PM   #4
Denarius
macrumors 6502a
 
Denarius's Avatar
 
Join Date: Feb 2008
Location: Gironde, France
Quote:
Originally Posted by angelwatt View Post
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.
Wow, you sussed that quickly. I was still trying to work out what the question was.
__________________
-MacBook Pro 15" 2.2GHz Santa Rosa 4GB 320gb 7200rpm (slightly dented from having a shelf land on it and from a rather unfortunate tumble from the table)
-OS 10.5.8 (XBench score 134)
Denarius is offline   0 Reply With Quote
Old Feb 2, 2010, 10:18 PM   #5
Mal
Thread Starter
macrumors 603
 
Mal's Avatar
 
Join Date: Jan 2002
Location: 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.
__________________
The Bearded Nerd
13" MacBook Pro; 64GB iPod touch
"It's a real burn, being right so often."
NoiseTrade.com/Walker

Last edited by Mal; Feb 2, 2010 at 10:26 PM.
Mal is offline   0 Reply With Quote
Old Feb 3, 2010, 03:54 AM   #6
Denarius
macrumors 6502a
 
Denarius's Avatar
 
Join Date: Feb 2008
Location: Gironde, France
Quote:
Originally Posted by Mal View Post
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.
__________________
-MacBook Pro 15" 2.2GHz Santa Rosa 4GB 320gb 7200rpm (slightly dented from having a shelf land on it and from a rather unfortunate tumble from the table)
-OS 10.5.8 (XBench score 134)
Denarius is offline   0 Reply With Quote
Old Feb 3, 2010, 05:59 AM   #7
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: USA
Quote:
Originally Posted by Mal View Post
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.
Quote:
Originally Posted by Mal View Post
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.
angelwatt is offline   0 Reply With Quote
Old Feb 3, 2010, 08:40 AM   #8
Mal
Thread Starter
macrumors 603
 
Mal's Avatar
 
Join Date: Jan 2002
Location: Orlando
Quote:
Originally Posted by angelwatt View Post
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.

Quote:
Take a look at YUI Grids CSS. Might get after what you're wanting.
Hmm, sounds interesting. Will look into it.

jW
__________________
The Bearded Nerd
13" MacBook Pro; 64GB iPod touch
"It's a real burn, being right so often."
NoiseTrade.com/Walker
Mal is offline   0 Reply With Quote
Old Feb 3, 2010, 10:42 AM   #9
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: USA
Quote:
Originally Posted by Mal View Post
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.
angelwatt is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPad: Smart Cover not centered Phoneinfo iPad Accessories 15 Nov 6, 2013 02:42 PM
Is Anyone Skilled at Centering Screen Protectors? mackandproud iPhone Accessories 23 Mar 29, 2013 03:26 AM
iPhone: Need help manually centering lockscreen slider. 561427 Jailbreaks and iOS Hacks 0 Feb 6, 2013 07:14 PM
Need Help Centering UL CSS menu screensaver400 Web Design and Development 2 Dec 27, 2012 07:28 PM
Hinge cover off-centered ? chacolo MacBook Air 6 Sep 2, 2012 01:31 PM

Forum Jump

All times are GMT -5. The time now is 04:11 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC