- This topic is empty.
-
AuthorPosts
-
February 25, 2015 at 7:00 pm #196813
knowledgenotebook
ParticipantHi,
I have a small block of text (a few words) for one div and then another div that has a large block of text. I want text in both divs to be centered but the following code does not work out this way.
P1: How to fix it?
Please see code here:
http://codepen.io/knowledgenotebook/pen/zxaxGoP2: I’d like to have the “Back” url function inside the to be bottom-right aligned with the DIV, how?
P3: Currently the table border color is solid blue, how to do sky blue, which looks smooth.
Thank you very much.
February 26, 2015 at 3:51 am #196831Paulie_D
MemberCouple of things…it’s not really a good idea to use numbers to identify elements.
<div id="36">
I think you’re allowed to do that under HTML5 but older browsers may not be so forgiving.
Also, if you would extract all that inline CSS to a proper stylesheet it might make it easier to see what is going on.
February 26, 2015 at 4:49 am #196832Senff
ParticipantYour inline styles are overriding your CSS styles:
<table style="border:1.5px solid blue; margin-left:8%; margin-right:8%; width:500;height:300"">
Plus there are a few things wrong with that (width and height have no “px” or “%” value, double quotes).
February 26, 2015 at 4:56 am #196833Paulie_D
MemberAlso it’s difficult to understand why a table is being used for this layout based on the small sample but, as we all know, using tables for general layout is not an optimal solution.
February 26, 2015 at 5:28 am #196838Paulie_D
MemberThere’s still a lot of inline CSS.
Also the
font
element is no longer valid.If you want “skyblue” just use it
border:1.5px solid skyblue;
..as for centering the text
div { text-align: center; }
Still wondering about that table layout though…it’s really hard to figure out what you are trying to do.
Perhaps a design image of the expect result would explain things?
February 26, 2015 at 6:19 am #196841Paulie_D
MemberA tables really isn’t the way to go here since it looks like you’re trying a transform.
There are a lot of card flip demos out there…I’d use one of those.
February 26, 2015 at 8:14 am #196864Paulie_D
MemberYou’d have to build a demo in Codepen for us to look much further.
February 26, 2015 at 8:59 am #196866Paulie_D
Member…and you still have the CSS inline.
If you don’t extract that to the CSS area as has been asked several times before you make it very hard to look through and help you.
February 26, 2015 at 9:20 am #196869Paulie_D
MemberThe thing is, we can’t control the content of each card, some of them may be simply copied and pasted from the web, hence, it would embed HTML and CSS code during the copy/paste process.
That sounds incredibly dangerous and unsecure. You’re asking to get hacked.
If you want consistency you should be limiting what and how users can add to ‘cards’.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.