| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
#1
|
|||||||
|
|||||||
Page Width
How to I properly resize the percentage of the page being utilized in XC5 without modifying code that will be over-written with updates?
For example: http://x5.greatlakesvacuum.com/store/Products/vacuum-oil/glv-fp_premium_lube_vacuum_pump_oil_-5_gallons-.html Thanks
__________________
X-Cart 4.5.4 Gold (Live Business Site) X-Cart 5.1.9 Business (In Development Now) |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Page Width
Nick, from what I understand, the easiest way to do this is via the custom CSS option provided by the XC/ThemeTweaker module. If this module is enabled, you should see the option under System Settings->Look and Feel->Custom CSS.
Turn on the Custom CSS with the checkbox at the top of the textarea. Then define your styles. This CSS is stored in the database, so it should not be overwritten by upgrades.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
#3
|
|||||||
|
|||||||
Re: Page Width
Thanks Mike. Do you have any idea what I need to enter for the CSS to style the width of the product pages? I guess I don't know what to put there
__________________
X-Cart 4.5.4 Gold (Live Business Site) X-Cart 5.1.9 Business (In Development Now) |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Page Width
Sure, what do you want to happen exactly? The more detailed explanation the better I can help.
The way I see it, the page has four sections. Image, Product details (Product title, quantity, add to cart), Description, and Related products. Explain how you want these to layout, and what width you want affected where.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#5
|
|||||||
|
|||||||
Re: Page Width
Quote:
Ok... So if you look at the width of the nav bar and white box... it seems to be limited to some pixel size as it grows? I don't know what size it is but it seems to be wasting a ton of the screen space on both sides on virtually every monitor size we have here. So my first thing I want to do is increase that size... of course if you can help me write the CSS code to do so, I can adjust the number later on, so lets just say I want to make that "wider". I don't know that I need to do anything with the image, I think its ok. The other 2 I won't really know if I want to move them around until after I see how the page works with the "container" that all those are in set wider.
__________________
X-Cart 4.5.4 Gold (Live Business Site) X-Cart 5.1.9 Business (In Development Now) |
|||||||
#6
|
|||||||
|
|||||||
Re: Page Width
Quote:
Ok, so it is in the body class, under the page-wrapper div. There is a width setting in there of 1037px ... can I change that? It appears to be its max as I tried 1200 and that made everything wider. I don't know if that is all I have to do though as that didn't move the description back up where it was before I increased the image size. EDIT: Ok making it 1400 did, so obviously this will work I just need to know if it is bad to do this? I think when the screen is smaller it sizes it down anyways EDIT2: Ok it sizes up in huge chunks though, why is it like that?
__________________
X-Cart 4.5.4 Gold (Live Business Site) X-Cart 5.1.9 Business (In Development Now) |
|||||||
#7
|
|||||||||
|
|||||||||
Re: Page Width
OK I understand now, you want to adjust the various sizes of the entire page width.
Your site is responsive. So it does re-size itself for smaller screens. Here is a crash course in responsiveness via media queries: Media queries define what CSS is applied based on the actual size of the page. Here is how they are defined: Code:
Note the @media (min-width: 1037 px) followed by a bracket. There is also a closing bracket that ends this section. The pertinent styles are defined inside. Media queries can also have a max-width range: @media only screen and (min-width:480px) and (max-width: 640px) {...} So you can see there are several min-widths set for your site. That is why it jumps in large chunks. For further example you have this CSS: Code:
More info: http://css-tricks.com/snippets/css/media-queries-for-standard-devices/
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#8
|
|||||||
|
|||||||
Re: Page Width
Mike, ok I sort of understand that.
I do already have a huge chunk of custom CSS on my site in that spot that looks like this: Code:
Where do I add the part above? It seems like some things are referenced in this more than once.
__________________
X-Cart 4.5.4 Gold (Live Business Site) X-Cart 5.1.9 Business (In Development Now) |
|||||||
#9
|
|||||||||
|
|||||||||
Re: Page Width
Nick,
To do this properly, you need to fully understand what I posted above. And I am not really giving you code samples there, just code examples, you need to determine what is right for your site. CSS is read vertically by the browser starting from the top. Class definitions placed lower in the document override the ones above, if the same values are redefined in the class. With the addition of media queries, now you need to take care with what exists within the media query brackets. All of the CSS that you referenced above exists at the top level, the classes are not contained within any brackets. So anywhere that you place this code should be fine. Since you are defining the queries, the code inside will take precedence at that screen width, overriding the code above that are just general rules. I would create a new line under the closing bracket for #header-area. At the bottom of the file. but it could just as easily exist at the top. There are several theories about how to organize CSS in a logical manner. I prefer general definitions at the top, then more specific definitions below.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|