Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2014-03-19 06:51:15

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: modify default textpattern style sheet ?

Hi Jim,

If I understand you correctly what you may want to change is this part of the code:

#container
{
	margin: 10px auto;
	padding: 10px;
	width: 1050px;
	\width: 1050px;
	w\idth: 1050px;
}

You may need to read about the box model. Regarding the first declaration, margin, the two values indicate that the container has a 10px margin on top and bottom and the auto value positions it in the left/right center of the browser.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#14 2014-03-19 10:03:17

gavnosis
Member
From: Milton Keynes, UK
Registered: 2005-03-12
Posts: 151
Website

Re: modify default textpattern style sheet ?

As well as the Web Developer tools mentioned earlier, there’s another (free!) extension (Also for Mozilla Firefox), called Firebug

This has a really helpful tool (with a catchy name something like ‘Click an element in the page to inspect’) which you can use to highlight each chunk of your web page (in the browser, with the mouse!) and it will draw abox round so you can see how big they are and show which CSS is controlling it!

Offline

#15 2014-03-19 10:09:17

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: modify default textpattern style sheet ?

Chrome and Safari also contain plenty of inbuilt dev tools that help you create and change CSS rules in-browser. I use Chrome’s dev tools personally.

Even IE has them if you are mad and hate yourself.

Offline

#16 2014-03-19 20:09:24

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 573
Website

Re: modify default textpattern style sheet ?

If I wanted to hate myself, I would angst about the demise of the Amiga computer.

Anyway.

Container is the entire width ?

Offline

#17 2014-03-19 20:28:59

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 573
Website

Re: modify default textpattern style sheet ?

I modified both #container and #sidebar-1.

Nothing moved to the left. I wound up squashing the left sidebar or making it too wide.

Lowered the #container to 800, squashed all of it.

Everything stays centered, but I don’t see where container is centered, nor sidebar-1 is centered.

I’ll look at it again after I retire next month.

Thanks for the help.

Offline

#18 2014-03-19 21:05:42

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: modify default textpattern style sheet ?

JimJoe wrote #279830:

Everything stays centered, but I don’t see where container is centered

That’s caused, like colak said, by the second value, auto, for #container’s margin (auto here equals right and left margin). Below margin: 10px auto;, add the following: margin-left: 2em; That should shift your page to the left edge of the window.

BTW Have you altered all three values for width? (There’s 3x 1050px for all kinds of broken browsers.)

{ Edited to remove wrong quote. }

Last edited by uli (2014-03-19 21:09:29)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#19 2014-03-19 21:38:49

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 573
Website

Re: modify default textpattern style sheet ?

Yes, altered all 3 values.

I took out auto, and everything moved left.

Adding in margin-left: 2em; didn’t seem to do much. But I am tired and may not see it visually.

Offline

Board footer

Powered by FluxBB