Hopefully the solution isn't too complicated, but how do I center the content of my webpage so that it's centered on all screen resolutions?
Something may look centered on my screen, but if I send the site to anyone else, it's totally off.
I also tried using the 'rigid' method as mentioned here: http://www.dreamweaverclub.com/css-center-content.php
but when I do, it shifts the tabs at the top, whereas I'd like to keep those on the top left of the page.
If needed, here is my code (forgive me if it's messy ;-; I kinda really suck at coding)
I typically use the "rigid method" and it works just fine.
2013-04-01, 02:12 PM
icephoenix21
Re: (Another) question about html and css
Quote:
Originally Posted by Zelkova
I typically use the "rigid method" and it works just fine.
I can use that, and it looks fine in chrome, but not in firefox.
Although the above mentioned site offers a solution for it, it makes it look okay in firefox, but not in chrome.
I guess not. Considering your sentence makes no sense to begin with.
Sorry for asking for help concerning a subject that I've stated many times that I do not understand and easily get confused by.
If you have nothing productive to contribute, then please leave.
2013-04-01, 03:35 PM
Takebacker
(Another) question about html and css
Quote:
Originally Posted by icephoenix21
I guess not. Considering your sentence makes no sense to begin with.
Sorry for asking for help concerning a subject that I've stated many times that I do not understand and easily get confused by.
If you have nothing productive to contribute, then please leave.
I was trying to help...considering i'm in the middle of building two websites i figured we might be able to learn something. Until that post, anyway...
I was wondering if an if statement would help. I'm just using center tags for my images so far and i can't decipher much of css.
2013-04-01, 03:42 PM
icephoenix21
Re: (Another) question about html and css
Quote:
Originally Posted by Takebacker
I was trying to help...considering i'm in the middle of building two websites i figured we might be able to learn something. Until that post, anyway...
I was wondering if an if statement would help. I'm just using center tags for my images so far and i can't decipher much of css.
Ah, it sounded like some sarcasm to me, as in 'you have no logic to save you, do you', because I've never heard of an 'if statement' before.
I even asked two others what they thought you meant :S
In that case, my apologies.
2013-04-01, 03:54 PM
Dusk
Re: (Another) question about html and css
Keep your .body the way it is. You need to define a style for .h4 (what you're using for the links) that overrides the body.
Code:
.h4
{
text-align: left;
}
2013-04-02, 11:08 AM
Zelkova
Re: (Another) question about html and css
Quote:
Originally Posted by icephoenix21
Ah, it sounded like some sarcasm to me, as in 'you have no logic to save you, do you', because I've never heard of an 'if statement' before.
I even asked two others what they thought you meant :S
In that case, my apologies.
I think he was referring to an "if" or "if / else" statement. A quick google search brought this to light.
I personally have only used this once or twice, and it was to redirect IE users :heart:
Ah, I see. That makes a bit more sense. I wish it were for firefox. I'm not so much concerned with IE, though since a majority of people do not use it.
2013-04-02, 11:27 AM
KhainiWest
Re: (Another) question about html and css
Quote:
Originally Posted by Takebacker
I was trying to help...considering i'm in the middle of building two websites i figured we might be able to learn something. Until that post, anyway...
I was wondering if an if statement would help. I'm just using center tags for my images so far and i can't decipher much of css.
To be fair it did seem like you were calling her stupid when I first read it too LOL. Like "There's no logic to save you is there". USE QUOTATIONS BRO.
2013-04-02, 11:30 AM
Takebacker
(Another) question about html and css
Sorry for thinking ifs are like the most fundamental coding structure that everyone should know before knowing what code even looks like. :/
2013-04-02, 03:15 PM
Locked
Re: (Another) question about html and css
Quote:
Originally Posted by Takebacker
Sorry for thinking ifs are like the most fundamental coding structure that everyone should know before knowing what code even looks like. :/
I don't believe there are if statements in CSS and HTML. JavaScript and PHP obviously have them though.
2013-04-02, 03:33 PM
Takebacker
(Another) question about html and css
Quote:
Originally Posted by Locked
I don't believe there are if statements in CSS and HTML. JavaScript and PHP obviously have them though.
Not natively yeah. It is like zelkova said, for checking browser version. I didn't know if it could go beyond that though but i threw it out there anyway. You can do php within html with <? > i think (or <?-- --> don't remember)
2013-04-02, 03:39 PM
Zelkova
Re: (Another) question about html and css
Quote:
Originally Posted by Takebacker
Not natively yeah. It is like zelkova said, for checking browser version. I didn't know if it could go beyond that though but i threw it out there anyway. You can do php within html with <? > i think (or <?-- --> don't remember)
<?php
?>
2013-04-02, 04:26 PM
Dusk
Re: (Another) question about html and css
Quote:
Originally Posted by Locked
I don't believe there are if statements in CSS and HTML. JavaScript and PHP obviously have them though.
Conditional comments exist, but yeah HTML and CSS are not code, so there is no branching logic.
Of course, you still have conditions. A CSS document tells your browser "if the content is a paragraph, display it this way. if it is a level 3 header, display it that way." And your body definition is an else catch-all that tells the browser how to display things that don't have a specific definition.
Another question, if I'm making a type of 'Terms of Service agreement' anyone know what I would put in the javascript so that after they hit the 'I accept' box, it would redirect them to the next page? This is the coding I have:
Spoiler
<form name="myform">
<p>Terms of service</p>
<div class=tostext>
<p>Pariatur mlkshk DIY culpa dreamcatcher echo park. Sustainable +1 mcsweeney's, butcher non laborum deserunt. Flannel sartorial aute biodiesel sint. Irony hella voluptate ethnic, magna tempor ennui. Squid portland dolor, scenester nesciunt et irony meh. Lomo 90's you probably haven't heard of them quis, raw denim ullamco nostrud locavore portland. Williamsburg try-hard cupidatat, deserunt quis 90's meggings reprehenderit deep v leggings.
Literally 3 wolf moon retro viral mumblecore adipisicing, scenester brunch ut banjo tofu. Gentrify pinterest portland, trust fund ennui iphone neutra street art pour-over artisan et brooklyn ullamco pitchfork seitan. Raw denim leggings nulla accusamus. Occaecat proident pinterest leggings VHS lo-fi etsy sunt art party dreamcatcher pop-up gluten-free biodiesel elit. Non swag gentrify, ethical flannel proident ethnic ugh williamsburg. Lo-fi ullamco tattooed letterpress. Dolor pickled shoreditch incididunt commodo try-hard, umami meh authentic semiotics craft beer fixie letterpress.</p>
</div>
<p>By clicking the checkbox I hereby accept the Terms of Service:<P>
<input type="checkbox" name="mycheck" onclick="toggleform('document.myform','mycheck','p name,pemail,ptext')"> I Accept</p>
</form>